Setting custom request header on a page redirect

前端 未结 1 1007
无人及你
无人及你 2020-12-04 02:05

I have a web application lets call it server1:8080/amcd this application has a setting in it that allows a user to be auto logged in when i pass in a custom request header i

相关标签:
1条回答
  • 2020-12-04 02:25

    A web page can not set HTTP request headers unless you are making an async request using XMLHttpRequest. In this case you are not, you are doing a redirect, like clicking on an href. Instead of relying on custom headers, depending on your backend use any one of these:

    1. Cookies
    2. GET variables
    3. POST variables
    0 讨论(0)
提交回复
热议问题