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

Take IPv6 into account for the host variable #1242

Closed
vnxme opened this issue May 8, 2024 · 0 comments
Closed

Take IPv6 into account for the host variable #1242

vnxme opened this issue May 8, 2024 · 0 comments
Labels
bug Something isn't working to deploy To be deployed during the time

Comments

@vnxme
Copy link

vnxme commented May 8, 2024

There is a minor bug in the following line:

data["host"] = strings.Split(c.Request.Host, ":")[0]

If c.Request.Host contains IPv4:port, then this line works correctly. But if this variable is [IPv6]:port, then this line takes a part of IPv6 with [ symbol at the beginning. E.g. for "[fcba:4:3:2::1]:80" data["host"] will be "[fcba".

@alireza0 alireza0 added bug Something isn't working to deploy To be deployed during the time labels May 8, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working to deploy To be deployed during the time
Projects
None yet
Development

No branches or pull requests

2 participants