summary refs log tree commit diff
path: root/handlers/portgate.go
diff options
context:
space:
mode:
Diffstat (limited to 'handlers/portgate.go')
-rw-r--r--handlers/portgate.go8
1 files changed, 5 insertions, 3 deletions
diff --git a/handlers/portgate.go b/handlers/portgate.go
index 6e002e7..2cf8e13 100644
--- a/handlers/portgate.go
+++ b/handlers/portgate.go
@@ -1,16 +1,18 @@
 package handlers
 
 import (
-	"github.com/valyala/fasthttp"
 	"net/http"
 	"portgate"
+	"strings"
 	"time"
+
+	"github.com/valyala/fasthttp"
 )
 
 // handlePortgateRequest handles all Portgate specific request for either showing Portgate
 // specific pages or handling creation of authorization tokens.
-func (h *RequestHandler) handlePortgateRequest(ctx *fasthttp.RequestCtx, path portgate.Path) {
-	if path.IsPortgateStaticPath() {
+func (h *RequestHandler) handlePortgateRequest(ctx *fasthttp.RequestCtx, destination portgate.Destination) {
+	if strings.HasPrefix(destination.Path, "/_portgate/static") {
 		h.staticHandler(ctx)
 	} else {
 		// TODO: Implement authentication, authorization