Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

How to use the password? #36

Closed
icewukong opened this issue Aug 24, 2016 · 4 comments
Closed

How to use the password? #36

icewukong opened this issue Aug 24, 2016 · 4 comments

Comments

@icewukong
Copy link

How to use "AUTH" in the HTTP request,when I call the "CONFIG SET requirepass mypass" command,?
Can you give me an example? Thank you!

@tidwall
Copy link
Owner

tidwall commented Aug 24, 2016

You can use the Authorization header. For example:

curl -H "Authorization: mypass" http://localhost:9851/get+truck1

@icewukong
Copy link
Author

After I took the password to the header of the HTTP request, the get and set operations returned the following information:
{"OK": "true", "elapsed": "0"}
After the set operation is performed, the data is not written to the AOF, and the get operation does not return the information I want.

@tidwall
Copy link
Owner

tidwall commented Aug 25, 2016

There appears to be a bug with http and auth. I'll need to look into it further.

@tidwall
Copy link
Owner

tidwall commented Aug 25, 2016

I just fixed this issue and pushed the update to the master branch. Please let me know if this doesn't work and thanks for reporting the bug.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants