You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Having issues with hosting the litestar application with a separate frontend.
Running pnpm run dev with litestar run -r works just fine.
Problem is getting this to production level infrastructure.
In my repository that I've linked, I place a caddy server infront of it and I end up receiving this error.
Access to fetch at 'http://localhost/accounts/login' from origin 'http://localhost:5173' has been blocked by CORS policy: Response to preflight request doesn't pass access control check: Redirect is not allowed for a preflight request.
1. Start Caddy, Backend and Postgresql Server with `docker compose up`in root dir
2. Start frontend server, `cd frontend/app`, `cp .env.example .env`, `pnpm install`, `pnpm run dev`
3. Open localhost:5173 in browser
4. Click register, fill in form.
5. Login with credentials.
6. Inspect console to see error log.
@peterschutt a PR to include options method for litestar to pass redirects?
I tried to write a custom middleware previously to allow options but I couldn't solve it.
Description
Having issues with hosting the litestar application with a separate frontend.
Running
pnpm run dev
withlitestar run -r
works just fine.Problem is getting this to production level infrastructure.
In my repository that I've linked, I place a caddy server infront of it and I end up receiving this error.
URL to code causing the issue
https://github.com/BrianLYS/sveltekit-litestar-cors-error
MCVE
Steps to reproduce
Screenshots
"![SCREENSHOT_DESCRIPTION](SCREENSHOT_LINK.png)"
Logs
No response
Litestar Version
2.8.3
Platform
Note
While we are open for sponsoring on GitHub Sponsors and
OpenCollective, we also utilize Polar.sh to engage in pledge-based sponsorship.
Check out all issues funded or available for funding on our Polar.sh dashboard
The text was updated successfully, but these errors were encountered: