如何在节点中找到引荐站点URL? [英] How do I find the a referring sites URL in node?

查看:124
本文介绍了如何在节点中找到引荐站点URL?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述



我正在使用快递,我会在连接头上找到这些东西吗? p>

谢谢!

解决方案

如果你的意思是你如何在运行时得到它一个快递服务器,然后根据您的请求使用标题方法完成:

  req.header('Referer'); 
// => http://google.com


How do I find the a referring sites URL in node?

I'm using express, would I find this in the headers on connect or something?

Thanks!

解决方案

If you mean how do you get it when running an express server, then it's done using the header method on your request:

req.header('Referer');
// => "http://google.com"

这篇关于如何在节点中找到引荐站点URL?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆