apache - Can AJAX submit credentials for Basic Authentication? -
this might little bit of stretch, let's assume need work way:
- i have index.html file in web root of server. javascript in file needs make ajax request /secure/ajax.php
- everything in /secure/ directory protected using basic authentication
- i don't want bother user logging in /secure/ section
can submit credentials basic authentication ajax request?
xmlhttprequest.setrequestheader friend.
xhr.setrequestheader("authentication", "username:password in base64")
you need convert username:password base64
Comments
Post a Comment