--host
and local dns names
#3976
jbergstroem
started this conversation in
Ideas
Replies: 1 comment
-
So, looking a bit closer into this; we are basically just looking at whatever Not sure if I am an exception case (read: relying on hostnames for locallys signed SSL certificates) so I'm not sure if a PR would be accepted where I just print " |
Beta Was this translation helpful? Give feedback.
0 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
A common practice where I work to keep environments as similar as possible is to use hostnames to separate environments; for instance
https://work.com
for production,https://staging.work.com
for a Q/A environment andhttps://dev.work.com
for local development. These may be resolved via either/etc/hosts
or a dns resolver. In this case,dev.work.com
would resolve to127.0.0.1
which is a local address, but treated by SvelteKit as external.This could be seen as a minor inconvenience since opening
127.0.0.1
would work in most cases. It gets tricker once you start usingcsp
or your own SSL certificates since both relies on what host is being used.I would like to suggest a change to how Sveltekit sees as local by resolving what is passed to
--host
(should it not be an ip) and based on the result, use said host for either local or external when writing to console or using launch.Thanks for your consideration.
Beta Was this translation helpful? Give feedback.
All reactions