3
0
corteza/pkg/options/HTTPServer.go
2020-11-26 11:11:08 +01:00

13 lines
333 B
Go

package options
func (o *HTTPServerOpt) Defaults() {
if o.WebappEnabled && o.ApiEnabled && o.ApiBaseUrl == "" {
// api base URL is still on root (empty string)
// but webapps are enabled (that means, server also serves static files from WebappBaseDir)
//
// Let's be nice and move API to /api
o.ApiBaseUrl = "/api"
}
}