国内CDN服务都要备案才能用,当买了国外的域名想备案时,发现却不能转入国内
#qzone location /psc { #配置cors设置,跨域用的 add_header Access-Control-Allow-Origin $http_origin; proxy_ssl_session_reuse off; #设置请求头的host proxy_set_header Host 'www.0x81.com'; #不允许重定向 proxy_redirect off; #设置refer空,否则会出现防盗链 proxy_set_header referer ''; proxy_pass http://www.0x81.com/psc; }
#又拍云 location / { proxy_pass http://你的又拍云test域名,非test域名会要求备案; proxy_set_header Host http://你的又拍云test域名,非test域名会要求备案; proxy_set_header X-Real-IP $remote_addr; proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for; proxy_set_header REMOTE-HOST $remote_addr; add_header X-Cache $upstream_cache_status; #Set Nginx Cache proxy_ignore_headers Set-Cookie Cache-Control expires; proxy_cache cache_one; proxy_cache_key $host$uri$is_args$args; proxy_cache_valid 200 304 301 302 60m; expires 12h; }