Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

リダイレクト時にパスを付与しないオプション #10

Open
lobin-z0x50 opened this issue Jun 30, 2022 · 0 comments
Open
Labels
優先度-低 余裕があればやる

Comments

@lobin-z0x50
Copy link
Member

lobin-z0x50 commented Jun 30, 2022

例えば以下のような設定になっているとき。

domain('ggg.example.com') {
  redirect_to 'https://ddd.example.com/out_of_service/'
}

https://ggg.example.com/login にアクセスすると、https://ddd.example.com/out_of_service/login にリダイレクトされ、想定外の 404エラーになってしまう。

以下のようにすると大丈夫。

domain('ggg.example.com') {
  nginx_config <<~CONFIG
    location / {
      return 301   https://ddd.example.com/out_of_service/;
    }
  CONFIG
}

そこで、以下のようにオプション指定することで、パスをドロップできないか?

domain('ggg.example.com') {
  redirect_to 'https://ddd.example.com/out_of_service/', drop_path: true
}
@lobin-z0x50 lobin-z0x50 added the 優先度-低 余裕があればやる label Mar 2, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
優先度-低 余裕があればやる
Projects
None yet
Development

No branches or pull requests

1 participant