You've already forked speedtest-go
Added url_base
parameter to customize the root url and allow hosting with another application. (#41)
* Added `url_base` parameter and code to rewrite URL * Manage redirect on stats login Co-authored-by: Nicolas Ledez <github.public@ledez.net>
This commit is contained in:
@ -8,6 +8,7 @@ import (
|
||||
type Config struct {
|
||||
BindAddress string `mapstructure:"bind_address"`
|
||||
Port string `mapstructure:"listen_port"`
|
||||
BaseURL string `mapstructure:"url_base"`
|
||||
ProxyProtocolPort string `mapstructure:"proxyprotocol_port"`
|
||||
ServerLat float64 `mapstructure:"server_lat"`
|
||||
ServerLng float64 `mapstructure:"server_lng"`
|
||||
@ -39,6 +40,7 @@ var (
|
||||
|
||||
func init() {
|
||||
viper.SetDefault("listen_port", "8989")
|
||||
viper.SetDefault("url_base", "")
|
||||
viper.SetDefault("proxyprotocol_port", "0")
|
||||
viper.SetDefault("download_chunks", 4)
|
||||
viper.SetDefault("distance_unit", "K")
|
||||
|
Reference in New Issue
Block a user