Skip to content

Commit

Permalink
services/sicp-staging: add more endpoints
Browse files Browse the repository at this point in the history
  • Loading branch information
linyinfeng committed Sep 22, 2024
1 parent badc003 commit 54613e1
Showing 1 changed file with 9 additions and 0 deletions.
9 changes: 9 additions & 0 deletions nixos/profiles/services/sicp-staging/default.nix
Original file line number Diff line number Diff line change
Expand Up @@ -297,6 +297,9 @@ in
{
forceSSL = true;
inherit (config.security.acme.tfCerts."li7g_com".nginxSettings) sslCertificate sslCertificateKey;
locations."/oj".extraConfig = ''
return 302 https://$host/${ojBase}/web/;
'';
locations."= /${ojBase}/web".extraConfig = ''
return 302 https://$host$request_uri/;
'';
Expand All @@ -315,6 +318,12 @@ in
try_files /index.html =404;
'';
};
locations."/api/" = {
proxyPass = "http://127.0.0.1:${toString config.ports.sicp-staging}";
extraConfig = ''
rewrite /${ojBase}/api/(.*) /$1 break;
'';
};
locations."/${ojBase}/api/" = {
proxyPass = "http://127.0.0.1:${toString config.ports.sicp-staging}";
extraConfig = ''
Expand Down

0 comments on commit 54613e1

Please sign in to comment.