Easy way to use Secure module (or similar) on all

2019-07-19 06:35发布

I'd like to know if there's a way I can tell Play to use the Secure module for every controller, without having to add With(Secure.class) to all my controllers or making all my controllers extend a single class. Ideas anyone?

1条回答
Root(大扎)
2楼-- · 2019-07-19 06:56

Yes you can intercept every-request with a play-plugin. Just have a look on modules/docviewer. It's very easy to implement. At the moment I'm working on a security-module where everything is forbidden as a default.

查看更多
登录 后发表回答