mirror of
https://codeberg.org/muon/home.git
synced 2026-03-08 03:25:16 +00:00
Fix seedbox
This commit is contained in:
parent
c54a2dd183
commit
99c3b62d1a
2 changed files with 184 additions and 191 deletions
|
|
@ -75,43 +75,40 @@ in {
|
|||
forceSSL = true;
|
||||
locations."/" = {proxyPass = "http://10.0.0.3:5001";};
|
||||
};
|
||||
"seedbox.muon.host" = {
|
||||
"stream.muon.host" = {
|
||||
forceSSL = true;
|
||||
enableACME = true;
|
||||
locations = {
|
||||
"/" = {
|
||||
proxyPass = "http://10.0.0.3:3013";
|
||||
};
|
||||
"/api" = {
|
||||
"/api/" = {
|
||||
proxyPass = "http://10.0.0.3:3014";
|
||||
extraConfig =
|
||||
#sh
|
||||
''
|
||||
limit_req zone=api burst=20 nodelay;
|
||||
|
||||
# CORS headers
|
||||
add_header Access-Control-Allow-Origin "*" always;
|
||||
add_header Access-Control-Allow-Methods "GET, POST, PUT, DELETE, OPTIONS" always;
|
||||
add_header Access-Control-Allow-Headers "DNT,User-Agent,X-Requested-With,If-Modified-Since,Cache-Control,Content-Type,Range,Authorization" always;
|
||||
add_header Access-Control-Expose-Headers "Content-Length,Content-Range" always;
|
||||
# add_header Access-Control-Allow-Origin "*" always;
|
||||
# add_header Access-Control-Allow-Methods "GET, POST, PUT, DELETE, OPTIONS" always;
|
||||
# add_header Access-Control-Allow-Headers "DNT,User-Agent,X-Requested-With,If-Modified-Since,Cache-Control,Content-Type,Range,Authorization" always;
|
||||
# add_header Access-Control-Expose-Headers "Content-Length,Content-Range" always;
|
||||
|
||||
# Handle preflight requests
|
||||
if ($request_method = 'OPTIONS') {
|
||||
add_header Access-Control-Allow-Origin "*";
|
||||
add_header Access-Control-Allow-Methods "GET, POST, PUT, DELETE, OPTIONS";
|
||||
add_header Access-Control-Allow-Headers "DNT,User-Agent,X-Requested-With,If-Modified-Since,Cache-Control,Content-Type,Range,Authorization";
|
||||
add_header Content-Type text/plain;
|
||||
add_header Content-Length 0;
|
||||
return 204;
|
||||
}
|
||||
# if ($request_method = 'OPTIONS') {
|
||||
# add_header Access-Control-Allow-Origin "*";
|
||||
# add_header Access-Control-Allow-Methods "GET, POST, PUT, DELETE, OPTIONS";
|
||||
# add_header Access-Control-Allow-Headers "DNT,User-Agent,X-Requested-With,If-Modified-Since,Cache-Control,Content-Type,Range,Authorization";
|
||||
# add_header Content-Type text/plain;
|
||||
# add_header Content-Length 0;
|
||||
# return 204;
|
||||
# }
|
||||
'';
|
||||
};
|
||||
"/api/stream" = {
|
||||
"/api/stream/" = {
|
||||
proxyPass = "http://10.0.0.3:3014";
|
||||
extraConfig =
|
||||
#sh
|
||||
''
|
||||
limit_req zone=download burst=10 nodelay;
|
||||
proxy_set_header Range $http_range;
|
||||
|
||||
# Streaming optimizations
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue