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
Swagger not working with @elysiajs/cors
#110
Comments
@Ateeb-Khan-97 what is the error you're seeing in the console specifically? :) |
@lndgalante @Ateeb-Khan-97 would you be able to share a minimal repo to reproduce? I tried to add cors to the examples/index.ts but I wasnt able to hit this error 😭 |
Tried a small codesandbox, and it seems it's related to helmet() in the sandbox at least, https://codesandbox.io/p/devbox/objective-sid-t5pcnk?file=%2Fhttp.ts%3A14%2C1 but locally is the CORS middleware which makes the swagger page go blank |
hey appreciate this :) let me investigate 🤔 |
okay so short term fix! this works
|
but let me find a proper fix : ) |
@lndgalante @Ateeb-Khan-97 found it 😶🌫️ feel free to pull and give this a test :) |
Thanks for taking care of this one @marclave, it works for me! |
cool let me merge :) |
@marclave Thanks man, appreciate it! |
I'm running Elysia 1.1.5 and still having the helmet/swagger conflict. |
@cholasimmons we just need a release, I think @SaltyAom is able to do a release this upcoming week ✨ it was fixed in #114 |
When ever I use elysia swagger with elysiajs/cors plugin swagger page doesn't loads and shows a blank page.
When i remove this line
app.use(cors());
it starts to work.version of each pakage are here.
"elysia": "^1.0.9",
"@elysiajs/cors": "^1.0.2"
"@elysiajs/swagger": "^1.0.3"
The text was updated successfully, but these errors were encountered: