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

Staging deploys should block search engines #76

Open
caesarsol opened this issue Nov 18, 2020 · 1 comment
Open

Staging deploys should block search engines #76

caesarsol opened this issue Nov 18, 2020 · 1 comment

Comments

@caesarsol
Copy link
Contributor

The solution is easy: adding a robots.txt in the build dir.
The problem is to be extra-sure we don't add that in production, but only in staging env!

We can't be sure about this since the same yarn build command is used, and the NODE_ENV variable is apparently not correctly set (@marcofugaro told me, but is that true?).
Seems like the best option could be to use something like:

[[ ! -v GENERATE_SOURCEMAP ]] && [[ -v CI ]] && echo 'User-agent: *\nDisallow: /' > build/robots.txt
@lucafalasco
Copy link
Contributor

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants