Set base URL for TubeArchivist with Nginx
March 17, 2024 · View on GitHub
js_path "/etc/nginx/conf.d/"; js_import main from ta_filter.js; js_set $body_hash main.get_hash;
server { location /multimedia/tubearchivist/ { rewrite ^/multimedia/tubearchivist(.) \1 break; proxy_pass http://{{subnets.multimedia}}.0.14:8000; proxy_set_header X-Forwarded-For proxy_add_x_forwarded_for; proxy_set_header X-Forwarded-Proto scheme; proxy_set_header X-Real-IP http_host; proxy_set_header Accept-Encoding identity; proxy_redirect ~^(.) /multimedia/tubearchivist\1; js_body_filter main.apply_base_url; add_trailer Body-Hash $body_hash; } }