Update Nginx example with CORS and location to index.html

This commit is contained in:
JC Brand 2018-12-20 17:59:51 +01:00
parent 32da46af5c
commit 55bb1826ea

View File

@ -180,9 +180,19 @@ Nginx
server {
listen 80
server_name mysite.com;
location = / {
root /path/to/converse.js/; # Properly set the path here
index index.html;
}
location ~ ^/http-bind/ {
proxy_pass http://someothersite.com;
}
# CORS
location ~ .(ttf|ttc|otf|eot|woff|woff2|font.css|css|js)$ {
add_header Access-Control-Allow-Origin "*"; # Decide here whether you want to allow all or only a particular domain
root /path/to/converse.js/; # Properly set the path here
}
}
}