nicolasff / webdis

A Redis HTTP interface with JSON output
https://webd.is
BSD 2-Clause "Simplified" License
2.84k stars 304 forks source link

Q: Basic Auth in XMLHttpRequest to Redis #89

Closed wiwat-tharateeraparb closed 10 years ago

wiwat-tharateeraparb commented 10 years ago

I have Redis with user and password in ACL but when submit

xhr = new XMLHttpRequest() xhr.open("GET", "http://hostname:7379/KEYS/*",true); xhr.setRequestHeader("Authorization","Basic "); xhr.send(null);

And receive "Request header field Authorization is not allowed by Access-Control-Allow-Headers." in Chrome.

Anyone knows how to fix this?

wiwat-tharateeraparb commented 10 years ago

Should add Authorization in http_response_set_header() in http.c.

nicolasff commented 10 years ago

Added, thank you!