feat: support for multiple additional hosts via env#19746
feat: support for multiple additional hosts via env#19746ari-party wants to merge 2 commits intovitejs:mainfrom
Conversation
|
@sapphi-red I'm using a Docker container, I don't have access to the source to make that change. |
Would you expand on why you don't have access to the source? Is the image built by others and you don't have contact with the people who built it?
|
Exactly that
The image in question deploys using a development build |
|
We discussed this feature during our team meeting.
|
|
Could you expand upon the "hostnames can include commas"? According to RFC 952, (host) names can only contain A-Z, 0-9, minus |
|
The URL Standard allows That said, this isn't a major point. There are other options where commas are valid, and we'd like to take those into account as well, to ensure consistent behavior in case we add more environment varibables. |
|
Commas are the common seperator for environment variables |
Description
Updates the code from #19325 to allow multiple hosts in the
__VITE_ADDITIONAL_SERVER_ALLOWED_HOSTSenvironment variable, and trims thehttporhttpsin case it is an FQDN. (e.g.https://example.com)May be better to use the URL API to extract the hostname instead, please let me know if this is preferred! ("The 'URL.canParse' is still an experimental feature and is not supported until Node.js 19.9.0.")