Compare commits
3 Commits
bc5c561775
...
1dcd3fe1a4
Author | SHA1 | Date |
---|---|---|
coolneng | 1dcd3fe1a4 | |
coolneng | dc1bb22d9d | |
coolneng | 801bc6f07d |
|
@ -18,13 +18,12 @@
|
|||
add_header Strict-Transport-Security "max-age=31536000; includeSubdomains";
|
||||
|
||||
# Minimize information leaked to other domains
|
||||
add_header 'Referrer-Policy' 'origin-when-cross-origin';
|
||||
|
||||
# Disable embedding as a frame, except from the same origin
|
||||
add_header Content-Security-Policy "frame-src git.coolneng.duckdns.org; frame-ancestors git.coolneng.duckdns.org";
|
||||
add_header 'Referrer-Policy' 'strict-origin-when-cross-origin';
|
||||
|
||||
# Prevent injection of code in other mime types (XSS Attacks)
|
||||
add_header X-Content-Type-Options nosniff;
|
||||
add_header X-XSS-Protection "1; mode=block";
|
||||
add_header X-Frame-Options SAMEORIGIN;
|
||||
|
||||
# This might create errors
|
||||
proxy_cookie_path / "/; secure; HttpOnly; SameSite=strict";
|
||||
|
@ -41,12 +40,13 @@
|
|||
"rewrite ^/gitea/(.*)$ https://git.coolneng.duckdns.org/$1 last;";
|
||||
"/miniflux/".extraConfig =
|
||||
"rewrite ^/miniflux/(.*)$ https://rss.coolneng.duckdns.org/$1 last;";
|
||||
# Delegation for Matrix
|
||||
"/.well-known/" = {
|
||||
alias = "${../well-known}" + "/";
|
||||
extraConfig = ''
|
||||
${config.services.nginx.commonHttpConfig}
|
||||
add_header Access-Control-Allow-Origin '*';
|
||||
add_header Content-Type application/json;
|
||||
default_type application/json;
|
||||
'';
|
||||
};
|
||||
};
|
||||
|
@ -70,7 +70,14 @@
|
|||
"git.coolneng.duckdns.org" = {
|
||||
enableACME = true;
|
||||
forceSSL = true;
|
||||
locations."/".proxyPass = "http://localhost:3000/";
|
||||
locations."/" = {
|
||||
proxyPass = "http://localhost:3000/";
|
||||
extraConfig = ''
|
||||
${config.services.nginx.commonHttpConfig}
|
||||
# Disable embedding as a frame, except from the same origin
|
||||
add_header Content-Security-Policy "frame-src git.coolneng.duckdns.org; frame-ancestors git.coolneng.duckdns.org";
|
||||
'';
|
||||
};
|
||||
};
|
||||
"rss.coolneng.duckdns.org" = {
|
||||
enableACME = true;
|
||||
|
@ -104,9 +111,9 @@
|
|||
enableACME = true;
|
||||
forceSSL = true;
|
||||
locations."/".root = pkgs.element-web.override {
|
||||
conf.default_server_config."m.homeserver" = {
|
||||
"base_url" = "https://matrix.coolneng.duckdns.org";
|
||||
"server_name" = "coolneng.duckdns.org";
|
||||
conf.default_server_config = {
|
||||
"m.homeserver"."base_url" = "https://matrix.coolneng.duckdns.org";
|
||||
"m.identity_server"."base_url" = "https://vector.im";
|
||||
};
|
||||
};
|
||||
};
|
||||
|
|
Loading…
Reference in New Issue