Skip to content
This repository has been archived by the owner on Jan 22, 2022. It is now read-only.

Configure Secure Cookies via Environment variable #20

Open
pmooneyarchitech opened this issue Feb 27, 2020 · 3 comments
Open

Configure Secure Cookies via Environment variable #20

pmooneyarchitech opened this issue Feb 27, 2020 · 3 comments

Comments

@pmooneyarchitech
Copy link

Be able to affect whether or not dotCMS will serve Secure Cookies (https://dotcms.com/docs/latest/cookie-use#Properties) via environment variables

@wezell
Copy link
Contributor

wezell commented Feb 28, 2020

In my mind, almost every variable in dotmarketing-config.properties should be overwriteable via environmental variables.

@jdotcms
Copy link

jdotcms commented Feb 28, 2020

On dotCMS we have interpolation for dotmarketing-config.properties

You can do something like

property1={env:SomeEnvironmentKey}
property2={sys:SomeSystemKey}

As you can see the first one is to get the value from the environment and the second from the system, the reference is here: https://dotcms.com/docs/latest/changing-configuration-properties#References

@pmooneyarchitech
Copy link
Author

@jdotcms That helps for my case, since I'm using the dotcms docker image as a base and building on top of it I can add those references into my dotmarketing-config.properties or dotmarketing-config-ext.properties files, and then I can turn on/off secure cookies depending on the environment without the extra overhead of having to put together a dockerize template of those files.

@wezell For people who want to just use the vanilla dotcms docker image, or just want to do less work, I think your opinion makes sense. The dotmarketing-config.properties, by default, could use string interpolation/references and the docker image provides all of the sensible default values for all of the environment variables.

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants