网关将请求转发到外部时,需要过滤敏感请求头,若不过滤,请求头泄露了,会造成什么影响吗?

2022-04-19 12:00:46 +08:00
 Sunhcer
776 次点击
所在节点    问与答
2 条回复
AoEiuV020CN
2022-04-19 12:21:25 +08:00
是说 Request header ?
一般包含 get 参数,可能还有一些鉴权信息,另外就是有些客户端信息,
什么影响不好说,要不你发几个样例大家看看有哪些有影响的数据,
Sunhcer
2022-04-19 12:34:25 +08:00
是的,比如以下 RequestHeader 参数:
:authority: xxx.com
:method: GET
:path: /gateway/questions?query=daily_hottest&page=1&size=9
:scheme: https
accept: */*
accept-encoding: gzip, deflate, br
accept-language: zh-CN,zh;q=0.9,en-US;q=0.8,en;q=0.7
content-type: application/json
cookie: _ga=GA1.2.2064040285.xxx; Hm_lvt_e23800c454aa573c0ccb16b52665ac26=xxx,1627203863,1627465270,1627562934; csrfToken=pOrHdM-zEFUfBAYVVxxx; showMotto=true; PHPSESSID=yyy; isCloseBeginnerGuide=1; referer=http://xxx.com/q/1010000041655818/edit; _gid=GA1.2.132730000.1650201310; PHPSESSID=bd36afab69d69df3f7b3f6xxx; _gat_gtag_UA_918487_8=1
referer: https://xxx.com/questions
sec-ch-ua: " Not;A Brand";v="99", "Google Chrome";v="97", "Chromium";v="97"
sec-ch-ua-mobile: ?0
sec-ch-ua-platform: "macOS"
sec-fetch-dest: empty
sec-fetch-mode: cors
sec-fetch-site: same-origin
token: bd36afab69d69df3f7b3f65ab46cc348
user-agent: Mozilla/5.0 (Macintosh; Intel Mac OS X 10_14_6) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/97.0.4692.99 Safari/537.36

这是一个专为移动设备优化的页面(即为了让你能够在 Google 搜索结果里秒开这个页面),如果你希望参与 V2EX 社区的讨论,你可以继续到 V2EX 上打开本讨论主题的完整版本。

https://www.v2ex.com/t/847863

V2EX 是创意工作者们的社区,是一个分享自己正在做的有趣事物、交流想法,可以遇见新朋友甚至新机会的地方。

V2EX is a community of developers, designers and creative people.

© 2021 V2EX