我收到一个支付网关https的帖子以验证付款等.我需要验证帖子是否来自域名.
我试图验证引用者来自某个域名列表但在我的req.headers中我没有看到引用者|引用者选项:
{ 'x-real-ip': '123.34.45.176',
'x-forwarded-for': '123.34.45.176',
host: 'my.foo.com',
'x-nginx-proxy': 'true',
connection: 'close',
'user-agent': 'Mozilla/4.0 (compatible; MSIE 5.01; Windows NT 5.0)',
accept: '*/*',
'content-length': '441',
'content-type': 'application/x-www-form-urlencoded' }
Run Code Online (Sandbox Code Playgroud)
为什么我的标题空了那些字段,如referer,origin等?
这是一篇帖子:
app.post('/payment/notify/', function(req, res){
req.headers
})
Run Code Online (Sandbox Code Playgroud)
Dan*_*iel 12
并非所有请求都有referer标头.
如果浏览器所在的最后一页是安全服务器(https),则它不会向您发送引用.
此外,如果您的用户在地址栏中输入您的地址,您也不会获得引用.
| 归档时间: |
|
| 查看次数: |
28365 次 |
| 最近记录: |