43 lines
1.0 KiB
Django/Jinja
43 lines
1.0 KiB
Django/Jinja
{% extends "core.j2" %}
|
|
{% block location %}
|
|
|
|
## LOCATIONS
|
|
location / {
|
|
root {{ conversejs_app_dir }};
|
|
index {{ item.index }};
|
|
}
|
|
|
|
location ~ /\. {
|
|
deny all;
|
|
}
|
|
|
|
{% if item.bosh_url is defined %}
|
|
location ^/http-bind {
|
|
proxy_pass {{ item.bosh_url }};
|
|
}
|
|
{% endif %}
|
|
|
|
location ^/upload {
|
|
proxy_pass {{ item.http_upload_url }};
|
|
}
|
|
{% if item.websocket is defined %}
|
|
location ^/xmpp-websocket {
|
|
proxy_pass {{ item.websocket_url }};
|
|
proxy_next_upstream error timeout invalid_header http_500 http_502 http_503;
|
|
proxy_set_header Host $host;
|
|
proxy_set_header X-Real-IP $remote_addr;
|
|
proxy_set_header X-Forwarded-For $remote_addr;
|
|
#proxy_set_header X-Forwarded-Proto https;
|
|
proxy_redirect off;
|
|
}
|
|
|
|
{% endif %}
|
|
include mime.types;
|
|
|
|
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 {{ conversejs_app_dir }}; # Properly set the path here
|
|
|
|
}
|
|
{% endblock %}
|