Skip to content

feat(login): redirect when Router::fullBaseUrl() is not same as App.loginUrl#64

Closed
watura wants to merge 1 commit intoavailabilityfrom
wtr/login-redirect
Closed

feat(login): redirect when Router::fullBaseUrl() is not same as App.loginUrl#64
watura wants to merge 1 commit intoavailabilityfrom
wtr/login-redirect

Conversation

@watura
Copy link

@watura watura commented Dec 18, 2019

やったこと

application.yml に App.loginUrl を定義した状態で、

なお、楽に確認するためには NetCommons3/NetCommons#561 とかがはいっているといいです。
example.com.ymlsecure.example.com.yml を用意して、example.com.yml には、fullBaseUrl と loginUrlを定義すると、テストがやりやすくなります。

なぜやるか

CDNで http://example.com はキャッシュして、http://secure.example.com はキャッシュしない。
でも、http://example.com から、利用者はほぼ考えることなく、 http://secure.example.com に遷移できるようにしたい。
ログイン画面に遷移しようとした時に、自動的に遷移させるようにすると、利用者は考えなくても遷移できているはずだ。と言う考えから実装しました。

もっとNC3の深いところから、secureとnon-secureを分けて動作するようにするのもよいかと思ったんですが、影響範囲が大きくなって、テストが難しくなるので、シンプルに分けるようにしました。

レビュー観点

  • loginUrl と言うコンフィグ名の妥当性
    • もっとなんかいい名前を考えたいですn

@watura watura changed the base branch from master to availability December 18, 2019 23:58
@watura watura requested a review from exKAZUu December 19, 2019 00:03
…oginUrl

App.loginUrl could be defined in application.yml
@watura watura force-pushed the wtr/login-redirect branch from e37aa2a to 9424826 Compare December 19, 2019 00:44
@watura
Copy link
Author

watura commented Dec 22, 2019

リポジトリが間違っていたので、close

@watura watura closed this Dec 22, 2019
@watura watura deleted the wtr/login-redirect branch December 22, 2019 23:44
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant