Ranter
Join devRant
Do all the things like
++ or -- rants, post your own rants, comment on others' rants and build your customized dev avatar
Sign Up
Pipeless API
From the creators of devRant, Pipeless lets you power real-time personalized recommendations and activity feeds using a simple API
Learn More
Comments
-
Awlex182753yI was wrong. He did make sure that staging will work... By hardcoding the staging host in the compile time config.
My god, I wish I could reach such heights in post nut clarity -
Awlex182753y@IntrusionCM Doesn't have to :)
After writing the text below: Sorry, I might have gone into to much detail
We're working on an elixir/phoenix project. Configuration in these projects generally works like this:
Before compiling, elixir will run the configuration code from the config file (config.exs) which in turn imports other configurations depending on the environment you're currently in (dev, test, prod).
Then there's a separate configuration file for software releases (releases.exs), that are run before the software is started.
Now what my boss did was this:
config.exs <- staging host
releases.exs <- production host
But all of that is actually unnecessary because I just hardcoded it, because apple is the only OAuth provider ever that doesn't accept localhost as a redirect uri, which is why I had to overwrite it.
It would have taken the correct host by removing my overwrite...
Boss: "You hardcoded the redirect uri in the code (Early on during development and forgot about it, because apple OAuth is a piece of shit), but don't worry I fixed it by hardcoding the uri with the production host into the config file where clearly all settings are fetched from the OS Environment variables at runtime. This will surely fix the problem in staging we have, no need to thank me"
rant