简体   繁体   中英

How to identify if HTTP GET request is made by console/firebug/IE9 F12?

I want to know if there is a way to identify is a HTTP request to a server is made through:

  • the browser console
  • JavaScript code running at client

I am able to make API calls to send like getJSON . Also I tried to make a Google Analytics call through the browser console.

Is there a way to find out if a request is made through the console, and if so can we block them at the server?

No. An HTTP request is an HTTP request, there is no way to tell what the source was.

(Also, "the browser console" is just a way to trigger "JavaScript code running at client")

检测到此问题的唯一方法是用户代理标头,但是标头可以由客户端更改

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM