1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26
| add_header 'Access-Control-Allow-Origin' *; add_header 'Access-Control-Allow-Credentials' 'true'; add_header 'Access-Control-Allow-Methods' 'PUT,POST,GET,DELETE,OPTIONS,HEAD'; add_header 'Access-Control-Allow-Headers' 'Content-Type, Content-Length, Authorization, Accept, X-Requested-With, Origin, XRequestedWith, LastModified';
location /qqgame/ {
if ( $request_method = 'OPTIONS' ) { add_header Access-Control-Allow-Origin $http_origin; add_header Access-Control-Allow-Headers Authorization,Content-Type,Accept,Origin,User-Agent,DNT,Cache-Control,X-Mx-ReqToken,X-Data-Type,X-Requested-With; add_header Access-Control-Allow-Methods GET,POST,OPTIONS,HEAD,PUT; add_header Access-Control-Allow-Credentials true; add_header Access-Control-Allow-Headers X-Data-Type,X-Auth-Token; return 200; }
rewrite ^/qqgame/(.*)$ /$1 break; proxy_pass http://openapi.tencentyun.com/; }
|