aboutsummaryrefslogtreecommitdiff
path: root/main.go
diff options
context:
space:
mode:
Diffstat (limited to 'main.go')
-rw-r--r--main.go3
1 files changed, 2 insertions, 1 deletions
diff --git a/main.go b/main.go
index 71d40de..10e1703 100644
--- a/main.go
+++ b/main.go
@@ -13,6 +13,7 @@ import (
"net/http"
"os"
"os/signal"
+ "regexp"
"time"
"golang.org/x/sys/unix"
@@ -33,7 +34,7 @@ func main() {
done := make(chan os.Signal, 1)
signal.Notify(done, os.Interrupt, unix.SIGTERM)
- srv := http.Server{Handler: &redirector{*from, *to, *vcs}}
+ srv := http.Server{Handler: &redirector{regexp.MustCompile(*from), *to, *vcs}}
go func() {
ln, err := listenSD()
if err != nil {