-
Notifications
You must be signed in to change notification settings - Fork 49
feat: add origin
config option
#582
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
Conversation
d16b985
to
d916ae2
Compare
d916ae2
to
688ed31
Compare
This commit adds the `origin` as an optional configuration parameter that can be set in the same way as `host` and `port`. This closes tuono-labs#232 and solves use-cases such as being able to develop on localhost with HTTPS with an origin name such as `https://tuono.localhost`, where HTTPS is required for testing certain web features (relating to e.g. storage or web workers). Prior to this commit this will not work as the Vite tools will attempt to load resources from e.g. `http://localhost:3000` and be blocked by the browser for attempting to load HTTP resources from an HTTPS web page.
688ed31
to
0e61e13
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks for the PR! Overall looks great.
Note: there is still a red pipeline for the rust part. Should be fixed with cargo fmt && cargo clippy
origin
config parameterorigin
config option
@pveierland were you able to make it working on your end? I remember we had a thread on discord about a broken usage with it |
Yes, this PR has solved my issues with use of HTTPS during development. There may be other possible improvements to make later, however this PR alone should make normal use-cases work. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Looks good to me.
I just found out that the create json config tests are not correct.
I'm going to fix this on main
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks for taking over @marcalexiei
Checklist
Related issue
Fixes #232
Overview
This commit adds the
origin
as an optional configuration parameter that can be set in the same way ashost
andport
.This closes #232 and solves use-cases such as being able to develop on localhost with HTTPS with an origin name such as
https://tuono.localhost
, where HTTPS is required for testing certain web features (relating to e.g. storage or web workers).Prior to this commit this will not work as the Vite tools will attempt to load resources from e.g.
http://localhost:3000
and be blocked by the browser for attempting to load HTTP resources from an HTTPS web page.