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

Exposing headers to REST breaks REST #102

Open
jasonbahl opened this issue Jul 10, 2020 · 4 comments
Open

Exposing headers to REST breaks REST #102

jasonbahl opened this issue Jul 10, 2020 · 4 comments
Assignees
Labels

Comments

@jasonbahl
Copy link
Collaborator

See: GoogleForCreators/web-stories-wp#2950 (comment)

The issue is here: https://github.com/wp-graphql/wp-graphql-jwt-authentication/blob/develop/src/ManageTokens.php#L337-L347

Since this isn't filterable, REST API plugins that actually have the need to set headers are being broken by WPGraphQL JWT Auth.

I think the best action is to remove this functionality from this WPGraphQL JWT Auth plugin as I feel like we're over-reaching the responsibility of this plugin anyway.

The intent of this plugin is to handle auth for GraphQL requests. While I'm not opposed to having the JWT tokens work for REST as well, that seems like a responsibility outside the scope of this plugin.

@jasonbahl jasonbahl added the bug label Jul 10, 2020
@jasonbahl jasonbahl self-assigned this Jul 10, 2020
@travis-r6s
Copy link

@jasonbahl So this would be linked with #89? I'm having that issue at the moment, where no X-Wp-Total/Pages headers are being exposed...

@sangeetjass
Copy link

Is this resolved, in my new stories plugin installation, I am getting the same error..

@tsmith-rv
Copy link
Contributor

I mentioned this in a comment on #89 as well, but I've opened a PR that I believe handles this issue in a way that should prevent so much breakage because of the headers. #118

@hatsumatsu
Copy link

hatsumatsu commented Apr 8, 2021

Just adding another affected plugin to the list:

https://wordpress.org/plugins/regenerate-thumbnails/

#118 fixes it.

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

No branches or pull requests

5 participants