root-gg / plik

Plik is a temporary file upload system (Wetransfer like) in Go.
https://plik.root.gg
Other
1.47k stars 168 forks source link

server/middleware: make SourceIP remove zone from ip addreses #460

Closed gnojus closed 1 year ago

gnojus commented 1 year ago

This fixes a bug where some requests would not be accepted if req.RemoteAddr is something like [fe80::0:8080%eth0]. This PR removes the %eth0 part in SourceIP middleware.

bodji commented 1 year ago

LGTM

gnojus commented 1 year ago

I see it broke the lint as strings.Cut is new to go 1.18. I don't see go version in action files, is it just the default one provided by github images? Note that goftm does not pass with go 1.19, probably due to enhanced doc string handling.