Recognizing Prod vs. Test Sites in a CPM
Summary
Looking for a reliable way to determine whether a custom process/event handler is running on a prod or a test site.Content
I have this custom script/event handler (CPM) running on one of my customers' sites. Overall, the script is not important except that it's an integration that tries to target one URL if it's running on a production site; and a different one if it's running on an upgrade/test site. (See attached image.)
The engineer who wrote this script tried to use every kind of value in $_SERVER to deduce whether the site name contains two dashes or two underscores...but exactly none of these are populated in CPMs running on modern versions of OSvC. At the very end of these tests is
Tagged:
0