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

Making disallow indexing safer #371

Closed
wants to merge 1 commit into from

Conversation

vpillinger
Copy link

@MWDelaney
Copy link
Member

MWDelaney commented Jul 31, 2018

This is removing basic Bedrock functionality and one of the main advantages to having different environments in the first place. I don’t think this is the way we should go here.

@kalenjohnson
Copy link
Contributor

I can understand the issues surrounding having a site set to not be indexed, that is a big issue. However I don't personally think we need to implement this. I agree with MWDelaney, we have environments for a reason.

Double checking production is spelled correctly is not reason enough to make change for everyone.

@MWDelaney MWDelaney closed this Jul 31, 2018
@vpillinger
Copy link
Author

vpillinger commented Aug 1, 2018

How about an alternative here where we move the configuration into config/environments files.

The main issue that I have with the current implementation is that this particular config is hardcoded to a specific environment where it can't be changed. For example, if someone wanted to create "altproduction" environment that doesn't block indexing then they could not with the current implementation. Or if they wanted to allow indexing on staging for some reason (I need to do this sometimes to test a web-scrape or other featrure short-term), then they could without having to change code.

This takes advantage of the environments and their associated configuration files in a more robust manner.

@austinpray
Copy link
Contributor

austinpray commented Aug 7, 2018

@vpillinger this can potentially be fixed by #380

You could (with the changes in that PR)

  1. add a "INDEXING_DISCOURAGED" environment variable
  2. have the mu-plugin respect it
  3. Config::define('INDEXING_DISCOURAGED', true) in application.php
  4. Config::define('INDEXING_DISCOURAGED', false) in environments/production.php

Now with this model if you feel like it should be "safer" you could just invert it

  • Config::define('INDEXING_DISCOURAGED', false) in application.php
  • Config::define('INDEXING_DISCOURAGED', true) in environments/*.php except production.php

This is not really possible with the current config scheme

Edit: or wait, maybe the other way around...we'll cross this bridge once #380 is figured out

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.

4 participants