dev-master
9999999-dev https://github.com/nyeholt/silverstripe-restrictedcmsA SilverStripe CMS module that will force users to a different hostname when hitting protected URLs.
BSD-3-Clause
The Requires
admin silverstripe
A SilverStripe CMS module that will force users to a different hostname when hitting protected URLs.
A SilverStripe CMS module that will force users to a different hostname when hitting protected URLs., (*1)
/dev/build
The restricted CMS module works by intercepting incoming requests to the CMS and comparing them against a set of patterns for particular hosts, to determine whether they should be allowed to be served by the current server., (*2)
This provides two layers of protection, (*3)
If you have a separate authoring instance (ie cms.mysite.com) to your main site (eg www.mysite.com), you can specify configuration that is loaded just for the specific environment. Using the sample restrictedcms.yml.sample file, the config blocks for each environment can be included / excluded by making use of the ENV_TYPE_FRONTEND or ENV_TYPE_BACKEND defines from your _ss_environment.php in the respective environments., (*4)
As SilverStripe's configuration layer only allows the swapping based on
define
d properties, you may need a fragment like the following if you're
setting these properties via environment variables from your webserver, (*5)
foreach (array('ENV_PROD', 'ENV_TEST', 'ENV_TYPE_FRONTEND', 'ENV_TYPE_BACKEND') as $envVar) { if (getenv($envVar)) { define($envVar, 1); } }
A SilverStripe CMS module that will force users to a different hostname when hitting protected URLs.
BSD-3-Clause
admin silverstripe