server {
listen 80;
listen [::]:80;
server_name localhost;
root /usr/share/nginx/html;
index index.html;
location = / {
try_files /index.html =404;
add_header Cache-Control "no-cache";
sub_filter_once off;
sub_filter '
Element' 'Flame HQ';
sub_filter 'name="application-name" content="Element"' 'name="application-name" content="Flame HQ"';
sub_filter 'name="apple-mobile-web-app-title" content="Element"' 'name="apple-mobile-web-app-title" content="Flame HQ"';
sub_filter 'https://app.element.io/themes/element/img/logos/opengraph.png' 'https://hq.b2bgrowth.systems/flame-hq/welcome-background.png';
sub_filter '' '';
}
location = /index.html {
add_header Cache-Control "no-cache";
sub_filter_once off;
sub_filter 'Element' 'Flame HQ';
sub_filter 'name="application-name" content="Element"' 'name="application-name" content="Flame HQ"';
sub_filter 'name="apple-mobile-web-app-title" content="Element"' 'name="apple-mobile-web-app-title" content="Flame HQ"';
sub_filter 'https://app.element.io/themes/element/img/logos/opengraph.png' 'https://hq.b2bgrowth.systems/flame-hq/welcome-background.png';
sub_filter '' '';
}
location = /version {
add_header Cache-Control "no-cache";
}
location /config {
root /tmp/element-web-config;
add_header Cache-Control "no-cache";
}
location /modules {
alias /modules;
}
location = /manifest.json {
alias /flame-hq/manifest.json;
default_type application/manifest+json;
add_header Cache-Control "no-cache";
}
location /flame-hq/ {
alias /flame-hq/;
add_header Cache-Control "no-cache";
}
location ~ ^/vector-icons/.*\.(?:ico|png)$ {
rewrite ^ /flame-hq/mark.png last;
}
error_page 500 502 503 504 /50x.html;
}