-
Notifications
You must be signed in to change notification settings - Fork 24
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
[Feature request]: Add ability to set server.origin
to fix CORS with Vite
#232
Comments
Could you please add some reproduction instructions? |
To reproduce, add the following to
|
Note that it is easiest to test with Chrome, as Firefox does not seem to provide this error message in the developer console. |
on tuono we hardcoded maybe we can change it to |
nvm, i just realize it's part of the code that run on the worker. can't get the hostname that way |
@pveierland You put a worker within the |
To access this file it needs to be within the |
The issue is not that the script is not available. It is available and can be downloaded from the URL:
The issue is that when using a HTTPS proxy with the site hosted at I've only used the The URL |
Thanks for the explanation! I hope to be available for this soon! |
Is your feature request related to a problem? Please describe.
Using certain features, such as Workers/SharedWorkers requires that the loaded resource has the same origin.
With
tuono dev
I'm now getting the following error when loading a SharedWorker:The file is confirmed available from the URL
https://project.localhost/vite-server/@fs/project/src/lib/worker.ts?worker_file&type=classic'
.Describe the solution you'd like
It appears that being able to control the Vite setting
server.origin
would allow fixing this CORS issue.At the same time, it would be good if the functionality of
server.host
andserver.port
could be controlled as well.Describe alternatives you've considered
No response
Additional context
No response
The text was updated successfully, but these errors were encountered: