mirror of
https://gitlab.com/ahoneybun/nix-configs.git
synced 2025-05-12 19:24:03 -06:00
Update nginx-reverse-proxy.nix
This commit is contained in:
parent
0a0b7c8839
commit
32cb004da4
1 changed files with 19 additions and 14 deletions
|
@ -1,18 +1,21 @@
|
||||||
security.acme.acceptTerms = true;
|
{ config, pkgs, ... }:
|
||||||
security.acme.defaults.email = "aaronhoneycutt@proton.me";
|
|
||||||
|
|
||||||
services.nginx = {
|
{
|
||||||
enable = true;
|
security.acme.acceptTerms = true;
|
||||||
recommendedTlsSettings = true;
|
security.acme.defaults.email = "aaronhoneycutt@proton.me";
|
||||||
recommendedOptimisation = true;
|
|
||||||
recommendedGzipSettings = true;
|
|
||||||
recommendedProxySettings = true;
|
|
||||||
|
|
||||||
virtualHosts = {
|
services.nginx = {
|
||||||
"ahoneybun.net" = {
|
enable = true;
|
||||||
forceSSL = true;
|
recommendedTlsSettings = true;
|
||||||
enableACME = true;
|
recommendedOptimisation = true;
|
||||||
locations."/" = {
|
recommendedGzipSettings = true;
|
||||||
|
recommendedProxySettings = true;
|
||||||
|
|
||||||
|
virtualHosts = {
|
||||||
|
"hydra.ahoneybun.net" = {
|
||||||
|
forceSSL = true;
|
||||||
|
enableACME = true;
|
||||||
|
locations."/" = {
|
||||||
proxyPass = "http://127.0.0.1:3000";
|
proxyPass = "http://127.0.0.1:3000";
|
||||||
|
|
||||||
extraConfig = ''
|
extraConfig = ''
|
||||||
|
@ -22,7 +25,7 @@
|
||||||
add_header 'Access-Control-Allow-Origin' '*' always;
|
add_header 'Access-Control-Allow-Origin' '*' always;
|
||||||
add_header 'Access-Control-Allow-Methods' 'POST, PUT, DELETE, GET, PATCH, OPTIONS' always;
|
add_header 'Access-Control-Allow-Methods' 'POST, PUT, DELETE, GET, PATCH, OPTIONS' always;
|
||||||
add_header 'Access-Control-Allow-Headers' 'Authorization, Content-Type, Idempotency-Key' always;
|
add_header 'Access-Control-Allow-Headers' 'Authorization, Content-Type, Idempotency-Key' always;
|
||||||
add_header 'Access-Control-Expose-Headers' 'Link, X-RateLimit-Reset, X-RateLimit-Limit, X-RateLimit-Remaining, X-Request-Id' always;
|
add_header 'Access-Control-Expose-Headers' 'Link, X-RateLimit-Reset, X-RateLimit-Limit, X-RateLimit-Remaining, X-Request-Id' alway>
|
||||||
if ($request_method = OPTIONS) {
|
if ($request_method = OPTIONS) {
|
||||||
return 204;
|
return 204;
|
||||||
}
|
}
|
||||||
|
@ -44,3 +47,5 @@
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
|
|
||||||
|
}
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue