How to prevent browser to invoke basic auth popup and handle 401 error using Jquery?

后端 未结 11 1260
隐瞒了意图╮
隐瞒了意图╮ 2020-11-27 12:18

I need to send authorization request using basic auth. I have successfully implemented this using jquery. However when I get 401 error basic auth browser popup is opened and

11条回答
  •  一个人的身影
    2020-11-27 13:12

    If you're using an IIS Server, you could setup IIS URL Rewriting (v2) to rewrite the WWW-Authentication header to None on the requested URL.

    Guide here.

    The value you want to change is response_www_authenticate.

    If you need more info, add a comment and I'll post the web.config file.

提交回复
热议问题