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

🐛fix: preview not show bug due to incorrect hosts file #914

Merged
merged 1 commit into from
Nov 2, 2021

Conversation

CallanBi
Copy link
Contributor

@CallanBi CallanBi commented Nov 1, 2021

I am a Gridea user and I found a bug caused by a boundary case in my usage.

When 127.0.0.1 is not mapped to localhost in the local hosts file (common when proxy applications modify the file, e.g. Proxifier), the rendering service does not start.

The local hosts file that causes this problem looks like this.

# Proxifier
127.0.0.1 www.proxifier.com
127.0.0.1 proxifier.com

##
# Host Database
#
# localhost is used to configure the loopback interface
# when the system is booting.  Do not change this entry.
##

This pull request is a fix for this boundary case. There are two changes from the previous version.

  1. no incremental port switching will be attempted after localhost is not found.
  2. give a friendly prompt after a failed preview renders, telling the user to check the hosts file.

@EryouHao
Copy link
Member

EryouHao commented Nov 2, 2021

Great MR! Thanks @Moltemort

@EryouHao EryouHao merged commit de67f7e into getgridea:master Nov 2, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants