Closed localjo closed 8 years ago
There's no easy way to do this. We could run Solidus in dev mode, which enables noindex
for all pages, but that would require changes to Broadway (to somehow detect the environment and set the appropriate CLI argument). Another way would be to check the URL in a preprocessor.
Why do you need to add that noindex
tag exactly? We've used review apps for a while, and it's not been an issue so far.
Yeah, @pushred mentioned that we've never had an issue before. I've just always made an effort to make sure that review sites don't get indexed by Google, but I've also spent a lot of time at SEO shops. Maybe this is a lower priority for us since we've never had an issue.
Closing this for now. We can reopen it if it becomes a concern.
When deploying a review app to Heroku, it would be good to have a way to detect that it's a review environment from layout.hbs, so that meta noindex tags can be added, among other things.
I thought
settings.env
in the site's JSON context would be a good way to detect if it's a review app or not, but the value of that is still "production" in a review app. (See: https://immunityproject-org-pr-69.herokuapp.com/.json).I think that value comes from the
NODE_ENV
environmental variable, so I'm not sure if the right solution is to use a different variable to detect review environments, or to make sure thatNODE_ENV
is set to a value other than "production" for review apps.