cors - 我该如何解决,XMLHttpRequest
问题描述
.htaccess
到目前为止,这是我的文件。我会把它贴在下面:
AddType text/plain .phps
AddType application/x-tgz .tgz
AddType application/x-chrome-extension .crx
AddType application/x-web-app-manifest+json .webapp
<filesMatch "^(index|preactalpha)\.html$">
FileETag None
<ifModule mod_headers.c>
Header unset ETag
Header set Cache-Control "max-age=0, no-cache, no-store, must-revalidate"
Header set Pragma "no-cache"
Header set Expires "Wed, 11 Jan 1984 05:00:00 GMT"
</ifModule>
</filesMatch>
<IfModule mod_rewrite.c>
RewriteEngine on
错误:
从源“ https://play.pokemonadventures.com ”访问“ https://sim2.pokemoninfinite.com/showdown/info?t=1558251232053 ”上的 XMLHttpRequest已被 CORS 策略阻止:否“访问控制允许” -Origin' 标头存在于请求的资源上。
我将第 4 节放在上面的第 .3 节“添加一些代码”中。
解决方案
推荐阅读
- javascript - 如何根据公共属性的值从另一个对象数组的所有元素中过滤对象数组
- dynamics-business-central - Business Central AL 代码超链接方法
- firebase - Flutter Web:MissingPluginException(在通道 plugins.flutter.io/firebase_auth 上找不到方法 startListeningAuthState 的实现)
- nginx - 如何通过没有域的IP服务器设置nginx,教程的问题
- azure - Azure APIM 如何更改请求 url
- android - Android Studio 在三星手机上找不到可调试的进程
- javascript - 将 useSelector 移动到辅助函数或自定义钩子
- javascript - 有没有办法嵌入 twitter 提要,但隐藏最近的推文,并首先显示“第二最近”的推文?
- javascript - index.js:1 未捕获的 ReferenceError:未定义 Swiper
- sql - 从 Oracle 表中的 max(effectiveDate) 中选择最长 2 年的记录