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

support for echo v2 engine fasthttp #25

Closed
hexadecy opened this issue Apr 7, 2016 · 7 comments
Closed

support for echo v2 engine fasthttp #25

hexadecy opened this issue Apr 7, 2016 · 7 comments

Comments

@hexadecy
Copy link

hexadecy commented Apr 7, 2016

There is an easy way to use echo v2 standard engine with cors.
But with the fasthttp engine, I had to create a fork and rewrite handlePreflight and handleActualRequest. It also add a dep to echo.

Do you want a PR or do I fork it?

@rs
Copy link
Owner

rs commented Apr 7, 2016

Would the result be free of new dep and still compat with net/http?

@hexadecy
Copy link
Author

hexadecy commented Apr 8, 2016

Still compat but only with a complete duplicate of the 2 functions, like handlePreflightEcho().
I just learned that echo will soon have a cors middleware built-in.
So I will complete it to have an alternative in case.

@jadbox
Copy link

jadbox commented Jun 9, 2016

It would be great to support Cors with plain fasthttp (without Echo).

@gaby
Copy link

gaby commented Mar 14, 2024

@hexadecy You closed this but didn't share how it was completed?

@rs Can this be re-open? It would be awesome to have native fasthttp support

@gaby
Copy link

gaby commented Mar 14, 2024

No worries, adding fasthttp will require adding a dependency in go.mod

@hexadecy
Copy link
Author

hexadecy commented Mar 14, 2024

@gaby sorry I didn't keep the code.
fasthttp dont have support for http2, and the fork fasthttp/http2#3 is barely alive.

@gaby
Copy link

gaby commented Mar 14, 2024

@gaby sorry I didn't keep the code. fasthttp dont have support for http2, and the fork fasthttp/http2#3 is barely alive.

I saw your post in the fasthttp repo, someone did a fork https://github.com/lab259/cors but it's 5 years behind :-)

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

No branches or pull requests

4 participants