Connect works
This commit is contained in:
parent
9394046f31
commit
43ec360d08
2 changed files with 3 additions and 2 deletions
|
@ -4,6 +4,7 @@ import (
|
|||
"context"
|
||||
"fmt"
|
||||
"net/http"
|
||||
"strings"
|
||||
"time"
|
||||
|
||||
"golang.org/x/crypto/bcrypt"
|
||||
|
@ -115,7 +116,7 @@ func (a *authenticator) routeAuth(w http.ResponseWriter, r *http.Request) {
|
|||
Name: "jwt",
|
||||
Value: tok,
|
||||
HttpOnly: true,
|
||||
Secure: true,
|
||||
Secure: !strings.HasPrefix(r.Host, "localhost:"),
|
||||
Domain: a.domain,
|
||||
})
|
||||
|
||||
|
|
|
@ -17,7 +17,7 @@ func (s *Server) setupRoutes() {
|
|||
|
||||
r.Group(func(r chi.Router) {
|
||||
// authenticated routes
|
||||
r.Use(s.auth.AuthMiddleware(), s.auth.VerifyMiddleware())
|
||||
r.Use(s.auth.VerifyMiddleware(), s.auth.AuthMiddleware())
|
||||
s.nex.InstallPrivateRoutes(r)
|
||||
})
|
||||
|
||||
|
|
Loading…
Reference in a new issue