gpt4 book ai didi

Does javascript's fetch expose whe website it came from? [closed](Java脚本获取会暴露它来自哪里的网站吗?[已关闭])

转载 作者:bug小助手 更新时间:2023-10-25 10:59:13 26 4
gpt4 key购买 nike




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.

行为可能因浏览器而异,但大多数常见浏览器默认情况下都会包含这些标头。


更多回答

26 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com