Is it possible to redirect traffic from Wasp's Post Requests?
Since there's no way to run code directly within Wasp upon signup or login, I've been trying to get around that while still keeping Wasp code untouched. I've created some custom code that I want to run on signup and I have it running on http://localhost:3002/auth/username/login.
Wasp runs on port 3001 so usually the wasp request to that same endpoint would be at this link:
http://localhost:3001/auth/username/login. When the post request is made to this link:
http://localhost:3001/auth/username/login
in Wasp the signup code is run to create a new user in Prisma. The code running on port 3002 that I created does the same thing with some extra steps. I want to be able to redirect any traffic that goes to this endpoint:
http://localhost:3001/auth/username/login.
to this endpoint:
http://localhost:3002/auth/username/login.
I've tried using Nginx to do the redirection but I don't think that'll work since for it to work Nginx would need to be listening on port 3001 and Wasp is using port 3001 so that would be a conflict.
So is there some way I can redirect this traffic, without altering the Wasp code directly.
1 Reply
Closing this one as it is duplicate, let's continue on the newer one!