1
1

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?

next.js+nginxでnet::ERR_BLOCKED_BY_CLIENTエラー

Posted at

経緯

ステージング環境で動作確認した際にnginx経由でfrontendからbackendへのアクセスができない

エラー内容

GET http://localhost:5000/api net::ERR_BLOCKED_BY_CLIENT

解決策

ステージング環境のlocalhostを見ているので、外部アクセスからでは見れないというエラー。
nginxの設定かと思ったが、私の場合はnext.jsでhttp://localhost:5000/apiを直接叩いているのが原因だった。
サーバーのipアドレスとアクセスするポート番号に置き換えてあげる

http://server_ip:server_port/api
1
1
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
1
1

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?