下面web建站小编给大家介绍一下关于Access-Control-Allow-Origin
跨域问题!
1、允许所有域名访问
add_header Access-Control-Allow-Origin *;
2、允许指定域名访问
add_header Access-Control-Allow-Origin https://ipkd.cn;
3、允许多个指定域名访问
set $cors_origin ""; if ($http_origin ~* "^https://ipkd.cn$") { set $cors_origin $http_origin; } if ($http_origin ~* "^https://echarts.ipkd.cn$") { set $cors_origin $http_origin; } add_header Access-Control-Allow-Origin $cors_origin;
nginx不支持这样写
add_header Access-Control-Allow-Origin https://ipkd.cn,https://echarts.ipkd.cn;
Nginx如何快速提高网站响应速度(Nginx Proxy Manager)
上面是“利用Access-Control-Allow-Origin允许指定多个域名跨域”的全面内容,想了解更多关于 前端知识 内容,请继续关注web建站教程。
当前网址:https://ipkd.cn/webs_2418.html
workflows工作流
红伞伞蓝杆杆云南蘑菇群ComfyUI工作流
一座千年九尾白狐玉雕ComfyUI工作流
树上挂着一只快乐的荔枝ComfyUI工作流
一只可爱的雪豹在雪地里散步ComfyUI工作流
一辆老式灵车在黑暗中从雾中出现ComfyUI工作流
一个浑身皮毛看起来像丘巴卡的3d动漫人物
树上站着一只鸟ComfyUI工作流
一个巨大的漆黑的蟹王ComfyUI工作流
猜你喜欢
声明:本站提供的所有资源部分来自互联网,如果有侵犯您的版权或其他权益,请发送到邮箱:admin@ipkd.cn,我们会在看到邮件的第一时间内为您处理!