清除请求头
我有一个名为“USER”的请求标头。 在我的 servlet 过滤器中获取它。
request.getHeader("USER")
我可以通过Is it possible toclear this value?
I have a request header with the name "USER". I can get it in my servlet filter by
request.getHeader("USER")
Is it possible to clear this value?
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
您无法重置某些请求标头值。但是,您可以使用过滤器编写请求包装器,如果标头名称为
USER
,则返回null
You cannot reset some request header value. But, you can write a request wrapper using a filter which returns
null
if the header name isUSER