Skip to content

Instantly share code, notes, and snippets.

@jackyyf
Created March 28, 2015 01:58
Show Gist options
  • Save jackyyf/98d832be590d1df94202 to your computer and use it in GitHub Desktop.
Save jackyyf/98d832be590d1df94202 to your computer and use it in GitHub Desktop.
Gist by paste.py @ 2015-03-28 09:58:19.416756
server {
listen 80;
server_name interface.bilibili.com;
root /usr/share/nginx/html;
index index.html index.htm;
resolver 114.114.114.114;
location / {
proxy_set_header Host $http_host;
proxy_redirect off;
proxy_pass http://interface.bilibili.com$request_uri;
proxy_set_header Host interface.bilibili.com;
}
location /playurl {
proxy_set_header Host $http_host;
proxy_redirect off;
proxy_pass http://interface.bilibili.com$request_uri;
proxy_set_header Host interface.bilibili.com;
subs_filter_types text/xml;
subs_filter '<from>.*</from>' '' r;
subs_filter '<stream>.*</stream>' '' r;
subs_filter '<args>.*</args>' '' r;
subs_filter '<letv_vid>.*</letv_vid>' '' r;
subs_filter '<letv_vtype>.*</letv_vtype>' '' r;
subs_filter '<src>.*</src>' '' r;
subs_filter '<![CDATA[' '';
subs_filter ']]>' '';
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment