-
Notifications
You must be signed in to change notification settings - Fork 116
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Allow XMLHttpRequests to prevent password dialogs
When presented a WWW-Authenticate header with "Basic", a browser will always ask the user for a password, before returning the 401 response to the web application issuing the XHR in the first place. Returning a fake authentication method instead seems to be the common workaround pattern.
- Loading branch information
Showing
3 changed files
with
17 additions
and
2 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,2 @@ | ||
Added a check to the basic auth module to respect the `X-Requested-With: "XMLHttpRequest"` header. | ||
In return the signature of the `WWW-Authenticate` header is changed so browsers will not pop up a password dialog. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters