const res = await fetch(
"https://api.dexscreener.com/latest/dex/tokens/" + 0x00000000000...
);
);
can this website know that the request originated from a website in particular or it just sees the user's machine ip?
这个网站可以知道请求来自特定的网站吗,或者它只看到了用户的机器IP?
更多回答
If they had no idea where the request came from what would be the point of CORS?
如果他们不知道请求来自哪里,CORS还有什么意义?
only IP I believe. so the server can allow requester ips to allow CORS.
我相信只有一个IP。因此,服务器可以允许请求者IPS允许CORS。
@Casey i didnt ask if they do know, but which part they know, user ip or refering website?
@Casey我没有问他们是否知道,但他们知道哪部分,用户IP还是参考网站?
@aaqib90 only user ip you think? So i can have multiple users doing these requests from my frontend with no problem?
@aaqi b90只有你认为的用户IP?所以我可以让多个用户从我的前台毫无问题地执行这些请求?
@Casey just looked at your profile pic bro lol
@Casey刚刚看了你的头像照片兄弟笑
优秀答案推荐
Yes. The browser will typically identify the origin of the request in the HTTP Origin and Referer headers.
是的浏览器通常会在HTTP Origin和Referer头中识别请求的来源。
You can easily test this yourself by opening your browsers developer tools, entering fetch("http://example.com/")
in the console, then checking the network tab for the request that's actually sent.
打开浏览器开发人员工具,在控制台中输入Fetch(“http://example.com/”)“),然后检查网络选项卡中实际发送的请求,就可以很容易地自己测试这一点。
The behavior can vary by browser, but most common browsers will include these headers by default.
行为可能因浏览器而异,但大多数常见浏览器默认情况下都会包含这些标头。
更多回答
我是一名优秀的程序员,十分优秀!