Gotify (working)

This commit is contained in:
Roberto Alsina 2024-04-30 13:45:59 -03:00
parent 6dd63cedcc
commit 63d518ebce
2 changed files with 24 additions and 1 deletions

View File

@ -10,5 +10,5 @@ When adding a new hostname, remember to create a cert for it using
Every 90 days the tailscale auth key will expire and you need to set a new one as
a secret.
* Create the new one at https://login.tailscale.com/admin/settings/keys
* Create the new one at https://login.tailscale.com/admin/settings/keys (MAKE IT REUSABLE)
* Configure it using flyctl secrets set TAILSCALE_AUTHKEY={{PASTEKEYHERE}}

View File

@ -37,11 +37,34 @@ server {
listen [::]:8080;
server_name gotify.ralsina.me;
add_header 'Access-Control-Allow-Origin' '*';
add_header 'Access-Control-Allow-Headers' '*';
add_header 'Access-Control-Allow-Credentials' 'true';
add_header 'Allow' 'POST, GET, OPTIONS';
if ($request_method = 'OPTIONS' ) {
return 200;
}
location / {
proxy_pass http://pinky.ralsina.github.beta.tailscale.net:7777;
proxy_set_header X-Forwarded-Host $http_host;
}
location /stream {
proxy_pass http://pinky.ralsina.github.beta.tailscale.net:7777;
proxy_set_header Host $host;
proxy_set_header X-Real-IP $remote_addr;
proxy_set_header Upgrade $http_upgrade;
proxy_set_header Connection "Upgrade";
}
error_page 403 404 500 502 503 504 /custom_50x.html;
location = /custom_50x.html {
root /usr/share/nginx/html;
internal;
}
}
server {