Skip to content
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

Make it easier to enter a URL during ghost config #812

Closed
ErisDS opened this issue Sep 5, 2018 · 1 comment · Fixed by #813
Closed

Make it easier to enter a URL during ghost config #812

ErisDS opened this issue Sep 5, 2018 · 1 comment · Fixed by #813
Assignees

Comments

@ErisDS
Copy link
Member

ErisDS commented Sep 5, 2018

At present we expect a fully formatted URL to be entered during ghost config including the protocol. However, we don't really make that clear in all cases and it's not really required. It's perfectly reasonable for me to enter mysite.com and expect that the CLI would add the https part for me along with setting up SSL.

Instead, what happens currently is the CLI complains the URL isn't valid 😞

I think we should add protocols to the URL according to the following rules:

  • if the url entered is localhost, or an ip, add http
  • if the url entered is a domain, add https

Note: we are moving as fast as we can towards only supporting http for development - all Ghost blogs should be run fully HTTPS in production.

@ErisDS ErisDS self-assigned this Sep 5, 2018
ErisDS added a commit to ErisDS/Ghost-CLI that referenced this issue Sep 5, 2018
closes TryGhost#812

- When entering a URL, add a protocol if one is missing
- Follow the rules laid out in TryGhost#812, so that we use https by default where possible
- Also handle domains entered with // at the start
@acburdine
Copy link
Member

As a side note this actually might allow us to upgrade our version of validatorjs, which is currently pinned a few major versions behind due to them changing the url validation.

Not that we have to update it, but if this change allows us to we might as well.

ErisDS added a commit to ErisDS/Ghost-CLI that referenced this issue Sep 6, 2018
closes TryGhost#812

Update url handling behaviour:
- When entering a URL, add a protocol if one is missing
- Follow the rules laid out in TryGhost#812, so that we use https by default where possible
- Also handle domains entered with // at the start
Swap to using url util
- moved all old usages of validate-instance-url
ErisDS added a commit to ErisDS/Ghost-CLI that referenced this issue Sep 7, 2018
closes TryGhost#812

Update url handling behaviour:
- When entering a URL, add a protocol if one is missing
- Follow the rules laid out in TryGhost#812, so that we use https by default where possible
- Also handle domains entered with // at the start
Swap to using url util
- moved all old usages of validate-instance-url
acburdine pushed a commit that referenced this issue Sep 9, 2018
closes #812

Update url handling behaviour:
- When entering a URL, add a protocol if one is missing
- Follow the rules laid out in #812, so that we use https by default where possible
- Also handle domains entered with // at the start
Swap to using url util
- moved all old usages of validate-instance-url
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants