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

Recommend changing status codes for ban messages #10

Open
nullvariable opened this issue Feb 10, 2021 · 1 comment
Open

Recommend changing status codes for ban messages #10

nullvariable opened this issue Feb 10, 2021 · 1 comment

Comments

@nullvariable
Copy link

Currently this plugin responds with a 200 status code for ban messages. This can cause caching systems to cache the page for users who are not banned, resulting in them seeing the ban message even though they are not banned. I would recommend responding with a 401 or 403 status code (or making this configurable.

For example, Pantheon's CDN will cache the banned message if a banned visitor accesses a page before other visitors causing the ban message to be shown to all users until that page falls out of the cache.

@lesterchan
Copy link
Owner

I think that is a good idea, somewhere along the lines of using https://developer.wordpress.org/reference/functions/status_header/, but sadly I will not have time to work on this, feel free to send in a PR if you want to =)

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

2 participants