Skip to content

Update README.md #20

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

Merged
merged 2 commits into from
Apr 10, 2018
Merged

Update README.md #20

merged 2 commits into from
Apr 10, 2018

Conversation

paladdins
Copy link
Contributor

Added Solution for Apache users

Added Solution for Apache users
README.md Outdated
@@ -33,6 +33,12 @@ add_filter( 'graphql_jwt_auth_secret_key', function() {
});
```

If you are using Apache to run Wordpress you should add this to your .htaccess in order to enable Authorization header in your project
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@paladdins Let's update the language a bit to explain that the WordPress environment needs to receive the Authorization header for authenticated requests. Maybe something like:

HTTP_AUTHORIZATION

In order to use this plugin, your WordPress environment must support the HTTP_AUTHORIZATION header. In some cases, this header is not passed to WordPress because of some server configurations.

Depending on your particular environment, you may have to research how to enable these headers, but in Apache, you can do the following in your .htaccess:

SetEnvIf Authorization "(.*)" HTTP_AUTHORIZATION=$1

For NGINX, this may work: https://serverfault.com/questions/511206/nginx-forward-http-auth-user#answer-511612

Updated instructions to set Authorization headers working
@paladdins
Copy link
Contributor Author

Ukeyy
Commited changes)

@jasonbahl
Copy link
Collaborator

@paladdins thanks for the PR. Merging.

@jasonbahl jasonbahl merged commit a468039 into wp-graphql:master Apr 10, 2018
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

Successfully merging this pull request may close these issues.

2 participants