public class ForceSSL extends Controller {
@Before
static void verifySSL() {
if(Play.mode == Play.Mode.PROD) {
if(!request.secure) {
redirect("https://" + request.host + request.url);
}
}
}
}
You wan mix it with any other controller using @With(ForceSSL.class)
> --
> You received this message because you are subscribed to the Google Groups "play-framework" group.
> To post to this group, send email to play-fr...@googlegroups.com.
> To unsubscribe from this group, send email to play-framewor...@googlegroups.com.
> For more options, visit this group at http://groups.google.com/group/play-framework?hl=en.
>
>
--
Guillaume Bort, http://guillaume.bort.fr
For anything work-related, use g...@zenexity.fr; for everything else,
write guillau...@gmail.com