climatepolicyradar / navigator

Policy navigator
BSD 3-Clause "New" or "Revised" License
4 stars 0 forks source link

WIP: FRO-129 redirect middleware #907

Closed joel-wright closed 1 year ago

joel-wright commented 1 year ago

Code is looking ok now... Going to test locally and report back here - @diversemix

linear[bot] commented 1 year ago
FRO-129 Make Frontend configurable at runtime.

This is a record of a discussion around this PR: [https://github.com/climatepolicyradar/navigator/pull/898](https://github.com/climatepolicyradar/navigator/pull/898) **Note -** There is still some concern that although this does get the env vars into the client at runtime, the app might still struggle. @patrick has seen issues when the THEME is flipped at runtime even on SSR pages as it appears the app does default to using `cpr` on the client side before the env queried and used. The PR below was merged as it does improve things code wise. But we still do not have 100% confidence that this will work The fall back is to carry on building 2 images and pushing to separate ECR repos. While this might impact CI times it will be simple enough to do for now and will guarantee the behaviour we want. This ticket is being left open until it is fully resolved by either: * The app fully working and configurable at runtime * The acceptance of building and deploying multiple images **DO NOT CLOSE WITHOUT ACCEPTING ONE OF THE ABOVE**

joel-wright commented 1 year ago

Thanks for fixing my shonky javascript - happy to merge when you think it's okay

joel-wright commented 1 year ago

superseded