Specify localhost as default host#203
Closed
leo wants to merge 3 commits intoember-fastboot:masterfrom
leo:master
Closed
Specify localhost as default host#203leo wants to merge 3 commits intoember-fastboot:masterfrom leo:master
leo wants to merge 3 commits intoember-fastboot:masterfrom
leo:master
Conversation
lib/commands/fastboot.js
Outdated
| { name: 'environment', type: String, default: 'development', aliases: ['e',{'dev' : 'development'}, {'prod' : 'production'}] }, | ||
| { name: 'serve-assets', type: Boolean, default: false }, | ||
| { name: 'host', type: String, default: '::' }, | ||
| { name: 'host', type: String, default: 'localhost' }, |
Member
There was a problem hiding this comment.
Let's have this be ::1 so that it is still IPv6
Author
|
@danmcclain Looks like the commit broke the tests...? |
Member
|
Looks like it will no longer support IPv4 127.0.0.1? |
Author
|
@danmcclain Replaced all |
xg-wang
pushed a commit
to xg-wang/ember-cli-fastboot
that referenced
this pull request
Nov 16, 2020
Remove .babelrc configuration file
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
IMHO, "localhost" or "127.0.0.1" should be the default address that gets used when serving an ember app using FastBoot (instead of "::", which allows connections on any IPv6/IPv4 address by default).
Devs will still be able to specify a different host (or "::" for all) using
--host.BEFORE
AFTER
By the way, I've also considered simply adding an if-statement to the method that logs the message which replaces the host with "localhost" if the original value is "::". But in my opinion, that's not a good solution because "::" allows connections over all addresses, not just the localhost one.
A nice side-effect of this change is that the user will be able to click the address within the command line to open it in the browser using
doubleclick+cmd.Besides of that, it might also be a little more secure because the app will only be available on the exact address shown in the logged message.