mirror of
https://github.com/mxpv/podsync.git
synced 2024-05-11 05:55:04 +00:00
62 lines
1.3 KiB
Plaintext
62 lines
1.3 KiB
Plaintext
upstream worker {
|
|
server ytdl:5002;
|
|
}
|
|
|
|
upstream backend {
|
|
server app:5001;
|
|
}
|
|
|
|
proxy_cache_path /tmp/nginx levels=1:2 keys_zone=feeds_cache:25m max_size=1g inactive=30m use_temp_path=off;
|
|
|
|
server {
|
|
listen 443;
|
|
|
|
root /var/www/;
|
|
index index.html;
|
|
|
|
server_name podsync.net;
|
|
|
|
ssl on;
|
|
ssl_certificate SSL_CERT;
|
|
ssl_certificate_key SSL_KEY;
|
|
ssl_trusted_certificate SSL_CHAIN_CERT;
|
|
|
|
add_header Strict-Transport-Security "max-age=63072000; includeSubdomains; preload";
|
|
|
|
access_log off;
|
|
|
|
proxy_set_header Host $host;
|
|
proxy_set_header X-Forwarded-For $remote_addr;
|
|
|
|
location /download {
|
|
proxy_pass http://worker;
|
|
}
|
|
|
|
location /api/webhooks {
|
|
proxy_pass http://backend;
|
|
client_max_body_size 128k;
|
|
}
|
|
|
|
location ~ (/user|/api) {
|
|
proxy_pass http://backend;
|
|
}
|
|
|
|
location / {
|
|
try_files $uri $uri.html $uri/ @backend;
|
|
}
|
|
|
|
location @backend {
|
|
proxy_cache feeds_cache;
|
|
proxy_ignore_headers Cache-Control;
|
|
proxy_cache_valid 10m;
|
|
proxy_cache_lock on;
|
|
proxy_cache_use_stale error timeout http_500 http_502 http_503 http_504;
|
|
|
|
add_header X-Proxy-Cache $upstream_cache_status;
|
|
|
|
proxy_pass http://backend;
|
|
proxy_buffers 8 16k;
|
|
proxy_buffer_size 16k;
|
|
}
|
|
}
|