Handling CORS Middleware with Error Responses in Effect Typescript
Hi All got a question about the middleware usage for cors purposes,
we got a situation where we want to allow all origins (don't ask please )
but yet we need credentinals to be true
so we can't use the given cors middleware as we need cant hardcode the origin ,instead relaying of the origin header
see this code
for happy path everything works, but
the problem is when my app returns an error , the headers do no set on the response ( as the it doesn't reach the part where i put the header )
how do i go about it ?
Thanks alot for your effort !
we got a situation where we want to allow all origins (don't ask please )
but yet we need credentinals to be true
so we can't use the given cors middleware as we need cant hardcode the origin ,instead relaying of the origin header
see this code
for happy path everything works, but
the problem is when my app returns an error , the headers do no set on the response ( as the it doesn't reach the part where i put the header )
how do i go about it ?
Thanks alot for your effort !
