MVC Redirect with custom headers

前端 未结 2 2106
谎友^
谎友^ 2020-12-06 12:50

Hopefully this is a simple question for someone out there.

Basically upon receiving a request to my MVC controller, I want to:

  1. Add an \"Authorization\"
2条回答
  •  情深已故
    2020-12-06 13:26

    No - 302 redirect are handled by browser and it will not re-attach headers.

    Options:

    • server side proxy
    • use cookies instead of other headers (if it is the same domain, not your case per 2)
    • manual redirect client side (may be ok since you are making AJAX call anyway).

提交回复
热议问题