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

Added noindex http headers #605

Closed
wants to merge 1 commit into from
Closed

Added noindex http headers #605

wants to merge 1 commit into from

Conversation

staabm
Copy link
Contributor

@staabm staabm commented Nov 11, 2018

Its redundant a bit, but better be safe then sorry.

Proxies/webserver might override the http status code and therefore error pages could show up in e.g. google search index

https://www.google.de/search?q=Whoops%21+There+was+an+error

Refs #604

@staabm
Copy link
Contributor Author

staabm commented Nov 11, 2018

Not 100% sure this header should better be sent in writeToOutputNow()

if ($this->sendHttpCode() && \Whoops\Util\Misc::canSendHeaders()) {

@kktsvetkov
Copy link

Why not add <meta name="robots" content="noindex" /> in HTML output as well ? Meta tags will be valid even after headers_sent()

@staabm
Copy link
Contributor Author

staabm commented Nov 11, 2018

The pretty-page-handler already contains this markup:
https://github.com/filp/whoops/blob/45dad4e41eff66217626029f4172b04dc4025442/src/Whoops/Resources/views/layout.html.php

This http-header has the benefit of also working for other handlers

@staabm staabm closed this Nov 21, 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