如何使用JBOSS 7.4设置samesite lax

发布于 2025-02-04 20:55:11 字数 1697 浏览 2 评论 0原文

我们目前正在使用JBOSS 7.4进行功能测试。我已经在文档该Undertow版本为2.2.5 并且根据 procthtow博客 要在WebApp上配置Samesite cookie,我必须添加 countertowhandlers.conf file(位于 Web-inf文件夹中),该文件仅包含以下行:

path(/) - > samesite-cookie(mode = lax) 但这无法正常工作(我会稍后使用StackTrace进行更新),

我尝试了不同的语法,但我仍然无法启动JBOSS:

path(/) - &gt; samesite-cookie(mode = lax = lax,cookie-pattern =*)< /code> ---&gt; patternsyntaxexception:悬空元字符'*'近索引0

path(/) - &gt; samesite-cookie(mode =“ lax”,cookie-pattern =“*”*“*”)> ---&gt;

 Caused by: java.lang.IllegalArgumentException: UT000045: Error parsing predicated handler string no handler named samesite-cookie known handlers are [disallowed-methods, allowed-methods, buffer-request, jdbc-access-log, http-continue-accept, secure-cookie, access-log, mark-secure, response-rate-limit, canonical-path, response-code, disable-cache, ssl-headers, trace, blocking, url-decoding, error-file, access-control, redirect, set, ip-access-control, request-limit, resource, compress, restart, clear, byte-range, eager-form-parser, done, rewrite, forwarded, stuck-thread-detector, reverse-proxy, jvm-route, learning-push, dump-request, proxy-peer-address, resolve-local-name, header, store-response, path-separator, resolve-peer-name]:
path(/)->samesite-cookie(mode=\"Lax\", cookie-pattern=\"*\")
                        ^"}}

任何帮助都将不胜感激,因为上述所有帮助都没有起作用。

谢谢。

We are currently using JBOSS 7.4 for functional testing. I've read on the documentation that undertow version is 2.2.5
and according to the undertow blog
that to configure the samesite cookie on a webapp, I have to added an undertow-handlers.conf file (located in the WEB-INF folder) which contains only the following line:

path(/)->samesite-cookie(mode=Lax)
but this is not working (I'll update with stacktrace later)

I tried different syntaxes but I still cannot start Jboss :

path(/)->samesite-cookie(mode=Lax, cookie-pattern=*) ---> PatternSyntaxException: Dangling meta character '*' near index 0

path(/)->samesite-cookie(mode="Lax", cookie-pattern="*") --->

 Caused by: java.lang.IllegalArgumentException: UT000045: Error parsing predicated handler string no handler named samesite-cookie known handlers are [disallowed-methods, allowed-methods, buffer-request, jdbc-access-log, http-continue-accept, secure-cookie, access-log, mark-secure, response-rate-limit, canonical-path, response-code, disable-cache, ssl-headers, trace, blocking, url-decoding, error-file, access-control, redirect, set, ip-access-control, request-limit, resource, compress, restart, clear, byte-range, eager-form-parser, done, rewrite, forwarded, stuck-thread-detector, reverse-proxy, jvm-route, learning-push, dump-request, proxy-peer-address, resolve-local-name, header, store-response, path-separator, resolve-peer-name]:
path(/)->samesite-cookie(mode=\"Lax\", cookie-pattern=\"*\")
                        ^"}}

Any help will be greatly appreciated as none of the above is working.

Thank you.

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

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

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。
列表为空,暂无数据
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文