Skip to content

Commit 62dbd79

Browse files
committed
serve astro assets directly through nginx
1 parent 76bc86a commit 62dbd79

1 file changed

Lines changed: 11 additions & 2 deletions

File tree

nix/nixos-module.nix

Lines changed: 11 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -332,11 +332,20 @@ in
332332
))
333333
{
334334
"${cfg.nginxConfig.subpath}" = {
335-
proxyPass = "http://127.0.0.1:${builtins.toString cfg.port}";
335+
alias = "${xnode-auth}/share/client";
336+
};
337+
"${cfg.nginxConfig.subpath}/_astro" = {
338+
alias = "${xnode-auth}/share/client/_astro";
336339
extraConfig = ''
337-
proxy_set_header Host $server_name;
340+
add_header Cache-Control "public, max-age=31536000, immutable";
338341
'';
339342
};
343+
# "${cfg.nginxConfig.subpath}/api" = {
344+
# proxyPass = "http://127.0.0.1:${builtins.toString cfg.port}${cfg.nginxConfig.subpath}/api";
345+
# extraConfig = ''
346+
# proxy_set_header Host $server_name;
347+
# '';
348+
# };
340349
"${cfg.nginxConfig.subpath}/api/internal" = {
341350
extraConfig = ''
342351
return 403;

0 commit comments

Comments
 (0)