_swag/retroarr.subdomain.conf
Rama main · réplica de lectura del repositorio original.
## Version 2024/01
# make sure your retroarr container is reachable from swag — either in the
# same docker network (name = retroarr) or via host IP.
# make sure your dns has a cname for retroarr.
#
# Upstream defaults to plain HTTP on 2727 inside retroarr (swag terminates tls).
# If you proxy to a host IP with the self-signed https port (2728), set
# $upstream_proto to https and add "proxy_ssl_verify off;" at the server
# level.
server {
listen 443 ssl;
listen [::]:443 ssl;
server_name retroarr.*;
include /config/nginx/ssl.conf;
# ROMs and save states can be several GB.
client_max_body_size 0;
proxy_read_timeout 3600s;
proxy_send_timeout 3600s;
# Don't hide the cross-origin isolation headers nginx forwards from the
# backend. SharedArrayBuffer (PSP, NDS, N64, ...) won't work without them.
proxy_pass_header Cross-Origin-Opener-Policy;
proxy_pass_header Cross-Origin-Embedder-Policy;
proxy_pass_header Cross-Origin-Resource-Policy;
# Uncomment the next line ONLY if your $upstream_proto is https and
# points at retroarr's self-signed port (2728).
# proxy_ssl_verify off;
# Specific regex first — nginx picks the first matching regex block,
# so this needs to win over /api below. Backend sends its own coop/coep,
# adding them here too would duplicate and break.
location ~ ^/api/v3/emulator/(assets|player|[0-9]+/rom) {
include /config/nginx/proxy.conf;
include /config/nginx/resolver.conf;
set $upstream_app retroarr;
set $upstream_port 2727;
set $upstream_proto http;
proxy_pass $upstream_proto://$upstream_app:$upstream_port;
proxy_buffering off;
proxy_request_buffering off;
}
# SignalR hub — swag's proxy.conf already sets the websocket upgrade
# headers, just disable buffering.
location /hubs/ {
include /config/nginx/proxy.conf;
include /config/nginx/resolver.conf;
set $upstream_app retroarr;
set $upstream_port 2727;
set $upstream_proto http;
proxy_pass $upstream_proto://$upstream_app:$upstream_port;
proxy_buffering off;
}
location ~ ^/api {
include /config/nginx/proxy.conf;
include /config/nginx/resolver.conf;
set $upstream_app retroarr;
set $upstream_port 2727;
set $upstream_proto http;
proxy_pass $upstream_proto://$upstream_app:$upstream_port;
}
location / {
include /config/nginx/proxy.conf;
include /config/nginx/resolver.conf;
set $upstream_app retroarr;
set $upstream_port 2727;
set $upstream_proto http;
proxy_pass $upstream_proto://$upstream_app:$upstream_port;
}
}