Enforce Https routing for login with play framework

后端 未结 6 2150
滥情空心
滥情空心 2020-12-05 03:22

I want to enforce https routing for the login page only of my application.

Is it possible to do so with Play! without the use of a front end http server?

6条回答
  •  暗喜
    暗喜 (楼主)
    2020-12-05 03:52

    It does not seem to be possible from the controller point of view. From the template Pere solution works but this only generates the https url from the template.

    If the user accesses the login action by either typing manually or following a link to the http url, there does not seem to be a way to enforce/redirect to https.

    The best way seems to have a front end proxy.

提交回复
热议问题