Skip to content

Commit 90a401b

Browse files
crewjamaep
andauthored
strip trailing / from IDP URL (crewjam#595)
* idp: fix crewjam#507 Options.URL must NOT have a trailing slash otherwise the form will post to //sso which gets redirected to /sso without reposting the data * clean up --------- Co-authored-by: Arvid E. Picciani <[email protected]>
1 parent 2a2708e commit 90a401b

File tree

1 file changed

+3
-0
lines changed

1 file changed

+3
-0
lines changed

samlidp/samlidp.go

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -8,6 +8,7 @@ import (
88
"net/http"
99
"net/url"
1010
"regexp"
11+
"strings"
1112
"sync"
1213

1314
"github.com/zenazn/goji/web"
@@ -47,6 +48,8 @@ type Server struct {
4748

4849
// New returns a new Server
4950
func New(opts Options) (*Server, error) {
51+
opts.URL.Path = strings.TrimSuffix(opts.URL.Path, "/")
52+
5053
metadataURL := opts.URL
5154
metadataURL.Path += "/metadata"
5255
ssoURL := opts.URL

0 commit comments

Comments
 (0)