1
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 1 year has passed since last update.

Laravel Aws 環境でRefererを取得できない時の対処

Last updated at Posted at 2023-07-07

環境

  • PHP
  • Laravel
  • EC2
  • CloudFront

対象のコード

$this->request->headers->get('referer');

null になってしまう。

原因

CloudFrontの設定でヘッダーにRefererが含まれていなかった。

ScreenShot 2023-07-07 17.17.10.png

image.png

対策

Referer にチェックを入れると取得できた。
めでたしめでたし。

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