fix: nginx audio mime types
This commit is contained in:
@@ -3,6 +3,10 @@ events {
|
|||||||
}
|
}
|
||||||
|
|
||||||
http {
|
http {
|
||||||
|
# MIME types
|
||||||
|
include /etc/nginx/mime.types;
|
||||||
|
default_type application/octet-stream;
|
||||||
|
|
||||||
# Proxy settings
|
# Proxy settings
|
||||||
proxy_http_version 1.1;
|
proxy_http_version 1.1;
|
||||||
proxy_buffering off;
|
proxy_buffering off;
|
||||||
@@ -28,6 +32,21 @@ http {
|
|||||||
# Increase client body size for image uploads
|
# Increase client body size for image uploads
|
||||||
client_max_body_size 100M;
|
client_max_body_size 100M;
|
||||||
|
|
||||||
|
# Audio files - fix Content-Type for browser playback
|
||||||
|
location ~ \.wav$ {
|
||||||
|
proxy_pass http://${GPU_SERVICE_HOST}:${GPU_SERVICE_PORT};
|
||||||
|
proxy_hide_header Content-Type;
|
||||||
|
add_header Content-Type "audio/wav";
|
||||||
|
proxy_hide_header Content-Disposition;
|
||||||
|
}
|
||||||
|
|
||||||
|
location ~ \.mp3$ {
|
||||||
|
proxy_pass http://${GPU_SERVICE_HOST}:${GPU_SERVICE_PORT};
|
||||||
|
proxy_hide_header Content-Type;
|
||||||
|
add_header Content-Type "audio/mpeg";
|
||||||
|
proxy_hide_header Content-Disposition;
|
||||||
|
}
|
||||||
|
|
||||||
location / {
|
location / {
|
||||||
# Proxy to service on RunPod via Tailscale
|
# Proxy to service on RunPod via Tailscale
|
||||||
proxy_pass http://${GPU_SERVICE_HOST}:${GPU_SERVICE_PORT};
|
proxy_pass http://${GPU_SERVICE_HOST}:${GPU_SERVICE_PORT};
|
||||||
|
|||||||
Reference in New Issue
Block a user