EdwinN1337
06/12/2023, 2:45 PMjs
createAndSendCustomEmail: async ({ email, urlWithLinkCode }) => {
try {
await sendEmail({
to: email,
emailMarkup: emailMarkup({ url: urlWithLinkCode! }),
subject: '...',
})
} catch (err) {
logError(err)
}
},
the urlWithLinkCode is generated with our backend config, but the domain is our web domain and we wanna link it to our app domain?
My idea was to get the req.original.headers.origin
so we can see where the request is comming from and swap the url.
How to get access to the request
from userContext?