wip m.jakstys.lt
This commit is contained in:
@@ -364,41 +364,54 @@ in
|
|||||||
precompressed zstd br gzip
|
precompressed zstd br gzip
|
||||||
}
|
}
|
||||||
'';
|
'';
|
||||||
"jakstys.lt".extraConfig = ''
|
"jakstys.lt".extraConfig =
|
||||||
header {
|
let
|
||||||
Strict-Transport-Security "max-age=15768000"
|
jakstysLandingPage = pkgs.runCommand "jakstys-landing-page" { } ''
|
||||||
Content-Security-Policy "default-src 'self'; style-src 'self' 'unsafe-inline'"
|
mkdir -p $out
|
||||||
X-Content-Type-Options "nosniff"
|
cp ${../../jakstys.lt.html} $out/index.html
|
||||||
X-Frame-Options "DENY"
|
'';
|
||||||
Alt-Svc "h3=\":443\"; ma=86400"
|
in
|
||||||
|
''
|
||||||
|
@redirects {
|
||||||
|
path /contact/
|
||||||
|
}
|
||||||
|
|
||||||
/_/* Cache-Control "public, max-age=31536000, immutable"
|
header {
|
||||||
}
|
Strict-Transport-Security "max-age=15768000"
|
||||||
|
Content-Security-Policy "default-src 'self'; style-src 'self' 'unsafe-inline'"
|
||||||
|
X-Content-Type-Options "nosniff"
|
||||||
|
X-Frame-Options "DENY"
|
||||||
|
Alt-Svc "h3=\":443\"; ma=86400"
|
||||||
|
|
||||||
root * /var/www/jakstys.lt
|
/_/* Cache-Control "public, max-age=31536000, immutable"
|
||||||
file_server {
|
}
|
||||||
precompressed zstd br gzip
|
|
||||||
}
|
|
||||||
|
|
||||||
@matrixMatch {
|
root * ${jakstysLandingPage}
|
||||||
path /.well-known/matrix/client
|
file_server {
|
||||||
path /.well-known/matrix/server
|
precompressed zstd br gzip
|
||||||
}
|
}
|
||||||
header @matrixMatch Content-Type application/json
|
|
||||||
header @matrixMatch Access-Control-Allow-Origin *
|
|
||||||
header @matrixMatch Cache-Control "public, max-age=3600, immutable"
|
|
||||||
|
|
||||||
handle /.well-known/matrix/client {
|
@matrixMatch {
|
||||||
respond "{\"m.homeserver\": {\"base_url\": \"https://jakstys.lt\"}}" 200
|
path /.well-known/matrix/client
|
||||||
}
|
path /.well-known/matrix/server
|
||||||
handle /.well-known/matrix/server {
|
}
|
||||||
respond "{\"m.server\": \"jakstys.lt:443\"}" 200
|
header @matrixMatch Content-Type application/json
|
||||||
}
|
header @matrixMatch Access-Control-Allow-Origin *
|
||||||
|
header @matrixMatch Cache-Control "public, max-age=3600, immutable"
|
||||||
|
|
||||||
handle /_matrix/* {
|
handle /.well-known/matrix/client {
|
||||||
reverse_proxy http://127.0.0.1:${toString myData.ports.matrix-synapse}
|
respond "{\"m.homeserver\": {\"base_url\": \"https://jakstys.lt\"}}" 200
|
||||||
}
|
}
|
||||||
'';
|
handle /.well-known/matrix/server {
|
||||||
|
respond "{\"m.server\": \"jakstys.lt:443\"}" 200
|
||||||
|
}
|
||||||
|
|
||||||
|
handle /_matrix/* {
|
||||||
|
reverse_proxy http://127.0.0.1:${toString myData.ports.matrix-synapse}
|
||||||
|
}
|
||||||
|
|
||||||
|
redir @redirects https://m.jakstys.lt{uri} 302
|
||||||
|
'';
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user