Vulnerability in EPiServer.Forms
Hi,In our team we have members who works in multiple environments simultaneously and I'm trying to minimize the risk of someone making a change in the wrong environment.I'm mostly worrying about the production env so my idea is to change the editor background in production so it will be super clear when the member is currently editing in production.What is the easiest way to achieve this goal?I need at least two things:1. A way to flag an environment as production.2. A way to load and apply a style based on if the flag(1) is set on the CMS editor page.The solution shouldn't be anything that needs to check the url during every request, we don't want extra overhead and web.config transforms won't do it either because release builds are used in other envs than prod.Are there any other built-in features in EPiServer CMS that could help me solve the original issue in any other way?
1) Even generic hosting runtime in .NET Core relies on some variables in configuration context (either coming from appSettings.json file, env variables, command line parameters, whichever source...). By default named ASPNETCORE_ENVIRONMENT.
2) If you want to follow similar approach - you can introduce new variable in web.config or any other config file you are using and override with proper value for proper environment (assuming that you might be using variable transformations not at build time, but at deploy time).
3) You can use client resourceregistration ferature in Episerver to accomplish this. Code sample:
public class EnvSpecificStyleInjection : IClientResourceRegistrator
public void RegisterResources(IRequiredClientResourceList requiredResources)
// do the magic here