I want to disable platform access for only my live environment while still allowing users to access the dev-<site>.pantheonsite.io/ and test-<site>.pantheonsite.io/ instances for validation and testing.
I was able to work around this by overriding the stored config setting in settings.php if the environment wasn't live, but this feels like it should work out of the box:
/**
* Only honor domain masking in live environment.
*
* Don't force domain masking in lando, dev, or test. We can ship yes or no
* in config to allow/disallow domain masking on a per-site basis, but don't
* get locked out of the platform in other environments.
*/
if ($_ENV['PANTHEON_ENVIRONMENT'] != 'live') {
$config['pantheon_domain_masking.settings']['allow_platform'] = 'yes';
}
I guess a similar technique could just enable/disable domain masking in the other environments instead of toggling allow_platform. I don't have a sense as to why one would be preferable to the other though.
I want to disable platform access for only my live environment while still allowing users to access the
dev-<site>.pantheonsite.io/
andtest-<site>.pantheonsite.io/
instances for validation and testing.I was able to work around this by overriding the stored config setting in
settings.php
if the environment wasn'tlive
, but this feels like it should work out of the box:I guess a similar technique could just enable/disable domain masking in the other environments instead of toggling
allow_platform
. I don't have a sense as to why one would be preferable to the other though.