3
int32
21h

Spent 4 hours trying to figure out why API endpoint keeps returning a 404, the data guy checked the database and the row exists. Didn't know the one endpoint it was using was for debugging, which also isn't working.

Turns out Angular somehow decided to switch environments and called the wrong endpoint. I was working in an HTML template and then suddenly shit stopped working. Someone probably committed the debugging endpoint by accident and I pulled the change into my code. Imagine a dev puts some super secret API key in there and pushes it to the remote repo. Congratulations, you now leaked a potentially private API key.

"Good practices", my arse.

The way Angular uses environments is retarded. Just use fucking .env files, why is it so hard?

Angular is retarded.

Comments
Add Comment