Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- map $upstream_http_location $redirect_uri {
- default "";
- "~http(?:s)?://[^/]/(?<location_uri>.*)$" "$location_uri";
- }
- upstream origin {
- server origin1.com;
- }
- server {
- listen 80;
- server_name nginx-front.com;
- proxy_set_header Host "origin1.com";
- proxy_redirect http://origin1.com/ /;
- location ~ ^/m3ugen/hls/(w+).mp4.m3u8$ {
- proxy_pass http://origin/m3ugen/segsrc/$1.mp4;
- error_code 301 302 = @handler;
- }
- location @handler {
- rewrite ^ /$redirect_uri;
- proxy_pass http://origin;
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement