Skip to content
This repository has been archived by the owner on Nov 30, 2021. It is now read-only.

Add local & remote url sniffing to the kit #20

Open
gavinwye opened this issue Jul 25, 2016 · 2 comments
Open

Add local & remote url sniffing to the kit #20

gavinwye opened this issue Jul 25, 2016 · 2 comments

Comments

@gavinwye
Copy link

When using the IV & 2FA prototypes you send a link to the service so that you can complete 2FA & IV then come back to your prototype at a set point in the journey.

The Child Benefit prototype has some javascript that works out the domain (usually localhost or Heroku) of the referring URL and sends you back to the referring domain. You can then test locally and deploy without making any changes.

@feedmypixel @rpowis what do you think about including this?

@adamfenwick Could you point at the code in the Child benefit repo, please?

@feedmypixel
Copy link

@gavinwye yes we have the success, failure url work created in the IV prototype earmarked to come in to the HMRC prototype kit in issue #13

Specifics or working out of urls shouldn't be in the generic implementation. It sounds like you need a variable in one place (app.locals) which sends in the url and failUrl dependant on process.env.NODE_ENV equalling production or development. Then you explicitly set those in one place in your app and it propagates through your app (making it simple to change).

If the above isn't the case I'd like to fully understand the task you are trying to solve. Something for the #community-prototype room

@vickytnz
Copy link

To be honest, I just create a variable that's set at the start of routes.js and do it that way by adding it in the ULR as a nunjucks variable - perhaps that's the same way you do it?

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