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

OAuth Authorization Header #9

Open
weierophinney opened this issue Dec 31, 2019 · 2 comments
Open

OAuth Authorization Header #9

weierophinney opened this issue Dec 31, 2019 · 2 comments

Comments

@weierophinney
Copy link
Contributor

Might want to update the docs for this, but it seems that Apache 2.4+ strips out the Authorization header by default. I had to add the following to get OAuth working again:
SetEnvIf Authorization "(.*)" HTTP_AUTHORIZATION=$1

This was on an existing project that was working fine and reprovisioned vagrant to use Apache 2.4. Afterwards, all my API requests were returning 403. Adding the above to my site config solved the issue.


Originally posted by @spectravp at zfcampus/apigility-documentation#45

@weierophinney
Copy link
Contributor Author

I had this same issue and it took a while before I figured out what was going on! :-|
If you are using a puPHPet vagrant box, you add a setenvif: setting in the vhost just under setenv.

        setenvif:
            - 'Authorization "(.*)" HTTP_AUTHORIZATION=$1'

Originally posted by @delboy1978uk at zfcampus/apigility-documentation#45 (comment)

@weierophinney
Copy link
Contributor Author

Had this on a live Ubuntu box with clean Apache 2.4 install.


Originally posted by @spectravp at zfcampus/apigility-documentation#45 (comment)

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

1 participant