首页 > 解决方案 > 我该如何解决,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 节“添加一些代码”中。

标签: cors

解决方案



推荐阅读