[DEV-1855] - Fix notifications
Please remove the WIDGET_BASE_URL from Novu's production container before/after merging.
My understanding of the issue is the following:
The issue with CORS was that Novu's wildcard allowed origin only checks for routes without an api prefix, e.g.:
function isInboxRoute(url: string): boolean {
return url.startsWith('/v1/inbox');
}
So in our case with the /api prefix it was simply adding the WIDGET_BASE_URL to the allowed origins which was review.igem.org for dev and igem.org in production hence the discrepancy between review working across all websites and production only working with igem.org.
Mimicking Novu's CORS setup in the proxy fixes the issue but the WIDGET_BASE_URL should be removed in order to avoid duplicate headers for igem.org.
Edited by Orestis Athanasopoulos Antoniou