-
Notifications
You must be signed in to change notification settings - Fork 25
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Use origin request param instead of process.env.ALIAS #1004
Use origin request param instead of process.env.ALIAS #1004
Conversation
When approving a user on the admin panel, I am not seeing an email being sent to the user confirming that they are approved. |
Kudos, SonarCloud Quality Gate passed! 0 Bugs No Coverage information |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Nice! All working!
The ALIAS environment variable was introduced to alias redirected request.
For example the host host
xyz-blog-dev.vercel.app
maybe routed throughgeolytix.dev
. In this case the origin will be unknown can be parsed from the request.header.referer like so:The user admin view script should set the login URL parameter flag if no user is provided.
The user mod routes which require a user should return the login view.
The ALIAS is required for cosmetics on the admin email.
The verify link does not have a referer since the link is opened directly in the browser, not through a view.
Protocol shouldn't be required though since can follow a host in link.
Without the alias the admin will get the vercel.app domain. Which should still work.