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

🌱 Add fiber_vhost middleware #1035

Merged
merged 2 commits into from
Nov 26, 2020
Merged

🌱 Add fiber_vhost middleware #1035

merged 2 commits into from
Nov 26, 2020

Conversation

K0enM
Copy link
Contributor

@K0enM K0enM commented Nov 26, 2020

Please provide enough information so that others can review your pull request:

I wrote a small middleware to enable the use of virtual hosts by comparing the Host header with the Hostname specified in the Config. I plan on extending the middleware to match Host's by regex as well.

@welcome
Copy link

welcome bot commented Nov 26, 2020

Thanks for opening this pull request! 🎉 Please check out our contributing guidelines. If you need help or want to chat with us, join us on Discord https://gofiber.io/discord

Copy link
Contributor

@kiyonlin kiyonlin left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

@kiyonlin
Copy link
Contributor

After a quick glance at the code, what do you think if we return handler result directly?

@K0enM
Copy link
Contributor Author

K0enM commented Nov 26, 2020

Whoops, that should indeed be return cfg.Handler(c). That's what you get by coding at 2 AM 😴 I'll fix it tomorrow.

@Fenny Fenny merged commit 1ae89eb into gofiber:master Nov 26, 2020
@welcome
Copy link

welcome bot commented Nov 26, 2020

Congrats on merging your first pull request! 🎉 We here at Fiber are proud of you! If you need help or want to chat with us, join us on Discord https://gofiber.io/discord

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.

3 participants