2
0

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?

More than 5 years have passed since last update.

よくあるクロスドメインの対応

Last updated at Posted at 2019-07-03

エラーが出た。

Access to XMLHttpRequest at 'http://hogehoge.com' from origin 'http://fugafuga.com' has been blocked by CORS policy: No 'Access-Control-Allow-Origin' header is present on the requested resource.

http://fugafuga.comのconfにheaderを追加

<Directory>
    Header set Access-Control-Allow-Origin "http://hogehoge.com"
    Header set Access-Control-Allow-Credentials true
    ...
</Directory>

これだけで対応できた。

2
0
1

Register as a new user and use Qiita more conveniently

  1. You get articles that match your needs
  2. You can efficiently read back useful information
  3. You can use dark theme
What you can do with signing up
2
0

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?