如何检查/使用``undertow handlers.conf''?
我有一个JBOSS 7.4。 我在Web-Inf文件夹中添加了我的战争应用程序code> conterctow handlers.conf
文件。 内容是:
path(/)->samesite-cookie(mode=LAX, case-sensitive=false, enable-client-checker=false, add-secure-for-none=false)
但是当Jboss启动该文件时,我看不到日志中的任何内容。除非文件的语法不正确。 我可以更改设置以查看是否设置和读取该处理程序?
实际上,使用此方法设置lax完全无法使用,我想知道当前使用/读取此文件是否在开始时。
非常感谢
I have a Jboss 7.4.
I added into my war application a undertow-handlers.conf
file in the WEB-INF folder.
Content is :
path(/)->samesite-cookie(mode=LAX, case-sensitive=false, enable-client-checker=false, add-secure-for-none=false)
But I can not see anything in the logs when Jboss is starting about that file. Except when the syntax of the file is not correct.
Is there a setting I can change to see if that handler is set and read/used?
Actually, setting LAX using this method for Samesite is not working at all and I wonder if this file is currently used/read at start.
Many thanks,
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
尝试在
unterctowhandlers.conf
的顶部插入以下行:然后点击JBOSS上的任何URL并检查服务器日志。
作为一个较少的详细替代方案,您还可以在尝试使用路径排名匹配路径的路径时,打印一些可用的变量
,然后%r相关路径是您想要匹配的。为了测试该匹配有效的作用,您可以将匹配与某些输出结合在一起,例如,以下内容有望将SpongeBob API的详细调试信息转储,但不能为其他任何路径倾倒。
我之所以提到上述内容,是因为匹配的路径一直是我的主要头痛来源,直到我弄清楚如何倾倒访问日志变量为止。匹配路径几乎是Undertow的核心功能。
该文档很难找到,但这是我所知道的最好的资源: https://undertow.io/undertow-docs/undertow-docs-2.0.0.0/predicates-attributes handlers.html
Try inserting the following line at the top of
undertow-handlers.conf
:Then hit any URL on your JBoss and check your server log.
As a less verbose alternative, you can also print some of the variables available to the access log
When trying to match paths using, say, path-prefix then the %R relative path is what you want to match on. To test that the match works, you can combine a match with some output, e.g. the following would be expected to dump the verbose debug info for your spongebob API but not for any other path.
I'm mentioning the above because matching paths has been a major source of headaches for me until I figured out how to dump the access log variables. And matching paths is pretty much the core functionality of Undertow.
The documentation is pretty hard to find but this is the best resource that I know of: https://undertow.io/undertow-docs/undertow-docs-2.0.0/predicates-attributes-handlers.html