- A+
所属分类:系统文档
location ^~/proxy/bing/ {
add_header 'Access-Control-Allow-Origin' 'http://localhost:8088';
add_header 'Cache-Control' 'public, max-age=604800';
add_header 'Access-Control-Allow-Credentials' 'true';
add_header 'Access-Control-Allow-Methods' 'GET, POST, OPTIONS';
rewrite ^/proxy/bing/(.*)$ /$1 break;
proxy_pass https://cn.bing.com/;
}
<?php
header('Content-Type: text/html;charset=utf-8');
header('Access-Control-Allow-Origin:*'); // *代表允许任何网址请求
header('Access-Control-Allow-Methods:POST,GET,OPTIONS,DELETE'); // 允许请求的类型
header('Access-Control-Allow-Credentials: true'); // 设置是否允许发送 cookies
header('Access-Control-Allow-Headers: Content-Type,Content-Length,Accept-Encoding,X-Requested-with, Origin'); // 设置允许自定义请求头的字段
if($_GET['name']) {
$name = $_GET['name'];
echo $name;
} else {
echo "请求成功但。。。。";
} ?>
- 我的微信
- 这是我的微信扫一扫
-
- 我的微信公众号
- 我的微信公众号扫一扫
-





2019年8月16日 上午9:15 沙发
<p>jaVasCript:/*-/*`/*\`/*