mirror of
https://github.com/sorenisanerd/gotty.git
synced 2024-11-22 20:34:26 +00:00
commit
64f73c4f04
@ -111,7 +111,12 @@ func (server *Server) Run(ctx context.Context, options ...RunOption) error {
|
|||||||
if server.options.EnableRandomUrl {
|
if server.options.EnableRandomUrl {
|
||||||
path = "/" + randomstring.Generate(server.options.RandomUrlLength) + "/"
|
path = "/" + randomstring.Generate(server.options.RandomUrlLength) + "/"
|
||||||
}
|
}
|
||||||
|
if !strings.HasPrefix(path, "/") {
|
||||||
|
path = "/" + path
|
||||||
|
}
|
||||||
|
if !strings.HasSuffix(path, "/") {
|
||||||
|
path = path + "/"
|
||||||
|
}
|
||||||
handlers := server.setupHandlers(cctx, cancel, path, counter)
|
handlers := server.setupHandlers(cctx, cancel, path, counter)
|
||||||
srv, err := server.setupHTTPServer(handlers)
|
srv, err := server.setupHTTPServer(handlers)
|
||||||
if err != nil {
|
if err != nil {
|
||||||
|
Loading…
Reference in New Issue
Block a user