search

Home  >  Q&A  >  body text

javascript - How to hide ajax requests in browsers such as chrome so that they will not be displayed in the console

Due to the confidentiality of the project, the address of the ajax request interface needs to be hidden. How do you do it?

淡淡烟草味淡淡烟草味2694 days ago5909

reply all(16)I'll reply

  • 怪我咯

    怪我咯2017-07-05 10:49:58

    It feels like a request made by someone who is completely ignorant of technology... There will be no display without ajax request, just pure back-end rendering

    reply
    0
  • typecho

    typecho2017-07-05 10:49:58

    ajax request is also an http request

    As long as it is an HTTP request, you can see the request address, parameters and response by capturing the packet

    reply
    0
  • 世界只因有你

    世界只因有你2017-07-05 10:49:58

    Don’t waste energy unless you don’t use HTTP protocol.

    reply
    0
  • 学习ing

    学习ing2017-07-05 10:49:58

    First, there is no need for ajax to render data in the background
    Second, using ajax to use an intermediate interface to only return the data required by the front-end
    It is impossible to expose the payment interface of our project to the front-end. It is the combination of these two methods

    reply
    0
  • 过去多啦不再A梦

    过去多啦不再A梦2017-07-05 10:49:58

    Cannot be hidden
    //You can use the backend to determine whether the connection source is legal. If it is not legal, close the connection
    // $_SERVER['HTTP_ORIGIN'] identifies which site the page request comes from
    if($_SERVER['HTTP_ORIGIN'] != 'http://www.baidu.com')
    {
    die();
    }

    reply
    0
  • PHP中文网

    PHP中文网2017-07-05 10:49:58

    Change the idea, the browser cannot hide it, the browser exposes the API, there is no such API

    reply
    0
  • Cancelreply