aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--cmd/relayd/main.go10
1 files changed, 9 insertions, 1 deletions
diff --git a/cmd/relayd/main.go b/cmd/relayd/main.go
index 71cee2b..3453fc0 100644
--- a/cmd/relayd/main.go
+++ b/cmd/relayd/main.go
@@ -6,13 +6,14 @@ import (
"errors"
"flag"
"fmt"
+ "log"
"net/http"
"net/http/httputil"
"net/url"
"time"
- "within.website/x/internal"
"golang.org/x/crypto/acme/autocert"
+ "within.website/x/internal"
)
func fwdhttps(w http.ResponseWriter, r *http.Request) {
@@ -48,6 +49,13 @@ func main() {
panic(err)
}
+ go func() {
+ err := http.ListenAndServe(*insecurePort, m.HTTPHandler(http.HandlerFunc(http.NotFound)))
+ if err != nil {
+ log.Fatal(err)
+ }
+ }()
+
rp := httputil.NewSingleHostReverseProxy(u)
s := &http.Server{