mirror of
https://github.com/fosrl/gerbil.git
synced 2026-09-01 03:31:29 +02:00
Merge pull request #106 from Adityakk9031/fix/issue-82
fix(main): sanitize `remoteConfigURL` to prevent 400 Bad Request on bandwidth reports (#82)
This commit is contained in:
7
main.go
7
main.go
@@ -579,9 +579,12 @@ func main() {
|
||||
logger.Fatal("You must provide either a config file or a remote config URL, not both")
|
||||
}
|
||||
|
||||
// clean up the reomte config URL for backwards compatibility
|
||||
// clean up the remote config URL for backwards compatibility
|
||||
remoteConfigURL = strings.TrimRight(remoteConfigURL, "/")
|
||||
remoteConfigURL = strings.TrimSuffix(remoteConfigURL, "/gerbil/get-config")
|
||||
remoteConfigURL = strings.TrimSuffix(remoteConfigURL, "/")
|
||||
remoteConfigURL = strings.TrimSuffix(remoteConfigURL, "/gerbil/receive-bandwidth")
|
||||
remoteConfigURL = strings.TrimSuffix(remoteConfigURL, "/gerbil")
|
||||
remoteConfigURL = strings.TrimRight(remoteConfigURL, "/")
|
||||
|
||||
var key wgtypes.Key
|
||||
// if generateAndSaveKeyTo is provided, generate a private key and save it to the file. if the file already exists, load the key from the file
|
||||
|
||||
Reference in New Issue
Block a user