redirection icon indicating copy to clipboard operation
redirection copied to clipboard

Suggestion: Support for WP Graphql and headless options

Open ColeTownsend opened this issue 4 years ago • 1 comments

Summary

Support preserving /graphql and custom WP Graphql domain

Actual Behavior

When redirecting URLs, the plugin protects urls like wp-admin and wp-json as those are needed for the admin panel and the WP Api. Ideally it could also protect the graphql endpoint without modification as that is a common option for folks.

Modification

I downloaded the plugin and modified it for my own needs but I'm no Wordpress or PHP dev.

$protected = apply_filters( 'redirect_relocate_protected', [
			'/wp-admin',
			'/wp-login.php',
			'/wp-json/',
			'/graphql',
		] );

ColeTownsend avatar Nov 21 '20 23:11 ColeTownsend

Hi @johngodley ,

We built a basic wp-graphql integration for Redirection for a project and would like to contribute it back to the community in one form or another. Would it make sense to add it as a PR here, or as a stand-alone Redirection "extension"?

Thank you, Ben

upham-ui avatar Dec 20 '21 19:12 upham-ui