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

feat: automatically fallback hostname for invalid hosts #62

Merged
merged 1 commit into from
Sep 6, 2023

Conversation

pi0
Copy link
Member

@pi0 pi0 commented Sep 6, 2023

πŸ”— Linked issue

❓ Type of change

  • πŸ“– Documentation (updates to the documentation, readme, or JSdoc annotations)
  • 🐞 Bug fix (a non-breaking change that fixes an issue)
  • πŸ‘Œ Enhancement (improving an existing functionality like performance)
  • ✨ New feature (a non-breaking change that adds functionality)
  • 🧹 Chore (updates to the build process or auxiliary tools and libraries)
  • ⚠️ Breaking change (fix or feature that would cause existing functionality to change)

πŸ“š Description

resolves #57

When hostname is (misconfigured) and invalid, instead of throwing a hard error, get-port listens on a fallback (IPv4) hostname (127.0.0.1 or 0.0.0.0 if public flag is explicitly set)

πŸ“ Checklist

  • I have linked an issue or discussion.
  • I have updated the documentation accordingly.

@pi0 pi0 changed the title feat/auto fallback feat: automatically fallback hostname for invalid hosts Sep 6, 2023
@codecov
Copy link

codecov bot commented Sep 6, 2023

Codecov Report

Merging #62 (666ca9a) into main (7d4d6bb) will increase coverage by 1.14%.
The diff coverage is 100.00%.

@@            Coverage Diff             @@
##             main      #62      +/-   ##
==========================================
+ Coverage   85.20%   86.35%   +1.14%     
==========================================
  Files           5        5              
  Lines         365      381      +16     
  Branches       47       48       +1     
==========================================
+ Hits          311      329      +18     
+ Misses         54       52       -2     
Files Changed Coverage Ξ”
src/_internal.ts 89.58% <100.00%> (+3.70%) ⬆️
src/get-port.ts 74.85% <100.00%> (+0.61%) ⬆️
src/types.ts 100.00% <100.00%> (ΓΈ)

@pi0 pi0 merged commit 8517b93 into main Sep 6, 2023
4 checks passed
@pi0 pi0 deleted the feat/auto-fallback branch September 6, 2023 18:34
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.

Auto host fallback
1 participant