http - 如何获得浏览器身份验证弹出窗口?

标签 http authentication browser http-headers basic-authentication

谁能告诉我,我怎样才能得到这个浏览器验证窗口?

enter image description here

最佳答案

此弹出窗口是 HTTP-Authentication 的一部分.为了获得它,您需要在您的网络服务器中启用它。正如维基百科所说:

When the server wants the user agent to authenticate itself towards the server, it can send a request for authentication.

This request should be sent using the HTTP 401 Not Authorized response code containing a WWW-Authenticate HTTP header.

The WWW-Authenticate header for basic authentication (used most often) is constructed as following: WWW-Authenticate: Basicrealm="insert realm"

关于http - 如何获得浏览器身份验证弹出窗口?,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/23004942/

相关文章:

c# - 从 Fiddler 隐藏我的应用程序产生的 Http(s) 流量

http - 如何在 Go 中执行 HTTP 双工处理程序?

java - ActiveMQ http 连接错误

php - 创建 session 用户登录php

azure - 限制目标用户访问 Azure 存储上托管的静态网站

linux - 'sudo -su' 到底是什么?

php - laravel file_get_contents ('php://input')不工作

javascript - 从浏览器访问 ArangoDB 数据

google-chrome - Chrome 和其他浏览器会放弃对同步 XMLHttpRequest 的支持吗?

android - Android 2.2 库存浏览器中的抗锯齿