Skip to content
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

CORS Implementation #20

Open
ReazerDev opened this issue Oct 20, 2021 · 1 comment
Open

CORS Implementation #20

ReazerDev opened this issue Oct 20, 2021 · 1 comment

Comments

@ReazerDev
Copy link

Hi,

I'm trying to use this framework as an API only.
Whenever I try to POST from my Angular App, I get a CORS error.
The Options goes through, I tried setting the Access-Control Headers there, thus the OPTIONS Request stopped failing.
But my POST still failed.

I tried implementing it myself in the http/Server.ts, like this:
image

But it doesn't seem to work. (I'm probably missing something, it's 3 am lol)

Oh and btw. GREAT Framework, it was exactly what I was looking for

@sahachide
Copy link
Owner

Hey,

thanks for your using ZenTS. Unfortunately i don't have time to maintain this framework anymore. CORS was indeed on the list, but never made it into ZenTS. If you want implemented by yourself, you've to check the RequestFactory and write and implement this what you've posted into the request handler. But as said, you probably are better of using a more mature framework like NestJS.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants