wellcomecollection.org
wellcomecollection.org copied to clipboard
Get the toggle_prismicStage cookie and set the prismic env via process.env
Who is this for?
People who want to test Prismic stage content
What is it doing for them?
Setting the prismic repository endpoint based on the presence of the prismicStage
toggle
Our standard means of accessing the toggles isn't available in the context that we set the prismic repository. I've added a PRISMIC_ENV
key to the node process.env
at the point we can first read the toggle (cookie) values with Koa. Not sure if this is the best approach, but I ended up chasing my tail trying to find a way to pass the value in where it was needed another way.