Skip to content

Commit

Permalink
change the way of prepending path
Browse files Browse the repository at this point in the history
  • Loading branch information
ili16 committed Jan 11, 2024
1 parent be75709 commit 53e1c60
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion main.go
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,7 @@ import (
"net/http/httputil"
"net/url"
"os"
"path"

"github.com/gin-gonic/gin"
"github.com/rwth-acis/modernizer/weaviate"
Expand Down Expand Up @@ -113,7 +114,7 @@ func proxy(c *gin.Context) {
req.Host = remote.Host
req.URL.Scheme = remote.Scheme
req.URL.Host = remote.Host
req.URL.Path = "chatbot/" + c.Param("proxyPath")
req.URL.Path = path.Join("/chatbot", c.Param("proxyPath"))
}

proxy.ServeHTTP(c.Writer, c.Request)
Expand Down

0 comments on commit 53e1c60

Please sign in to comment.