0
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?

CORSのAccess-Control-Allow-Originについて

Posted at

JavascriptからAPIへ

fetch(mode:"cros" ...

で要求してもCROSで弾かれる。
全て正しく設定している「つもり」だった。

間違っていたのは、

Access-Control-Allow-Origin: http://localhost:4321/

正しいのは

Access-Control-Allow-Origin: http://localhost:4321

最後のスラッシュの有無。

気がつくのに一時間、悩んだ。

0
0
0

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
0
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?