如何检查/使用``undertow handlers.conf''?

发布于 2025-02-07 18:11:42 字数 376 浏览 2 评论 0原文

我有一个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 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(1

对你再特殊 2025-02-14 18:11:42

尝试在unterctowhandlers.conf的顶部插入以下行:

dump-request

然后点击JBOSS上的任何URL并检查服务器日志。

作为一个较少的详细替代方案,您还可以在尝试使用路径排名匹配路径的路径时,打印一些可用的变量

access-log(format='%m; %U; %R')

,然后%r相关路径是您想要匹配的。为了测试该匹配有效的作用,您可以将匹配与某些输出结合在一起,例如,以下内容有望将SpongeBob API的详细调试信息转储,但不能为其他任何路径倾倒。

path-prefix('/api/spongebob') -> dump-request

我之所以提到上述内容,是因为匹配的路径一直是我的主要头痛来源,直到我弄清楚如何倾倒访问日志变量为止。匹配路径几乎是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:

dump-request

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

access-log(format='%m; %U; %R')

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.

path-prefix('/api/spongebob') -> dump-request

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

~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文