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

Add x-redirect-by header to all redirects #31

Merged
merged 2 commits into from
Jun 28, 2024

Conversation

snim2
Copy link
Contributor

@snim2 snim2 commented Jun 28, 2024

When we have incidents or tricky pieces of debugging, it is
often useful to know what part of a WordPress system has
generated an HTTP redirect.

By convention, WordPress sends a header called 'x-redirect-by'
with all redirects, which either contains the third argument
to wp_redirect() / wp_safe_redirect() or the default string
'WordPress'.

Because dxw-members-only does not use the WordPress global
functions to provide redirects, it has no equivalent. So, this
commit adds the 'x-redirect-by' header explicitly.
See: https://developer.wordpress.org/reference/functions/wp_redirect/

  • Version number has been bumped

When we have incidents or tricky pieces of debugging, it is
often useful to know what part of a WordPress system has
generated an HTTP redirect.

By convention, WordPress sends a header called 'x-redirect-by'
with all redirects, which either contains the third argument
to wp_redirect() / wp_safe_redirect() or the default string
'WordPress'.

Because dxw-members-only does not use the WordPress global
functions to provide redirects, it has no equivalent. So, this
commit adds the 'x-redirect-by' header explicitly.

See: https://developer.wordpress.org/reference/functions/wp_redirect/
@snim2 snim2 merged commit 6a42874 into master Jun 28, 2024
3 checks passed
@snim2 snim2 deleted the feature/send-x-redirect-by-header branch June 28, 2024 09:53
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