Skip to content

Commit 22dde6c

Browse files
committed
Ignore bad cert in backend
1 parent d2a0a4c commit 22dde6c

File tree

3 files changed

+7
-3
lines changed

3 files changed

+7
-3
lines changed

build.sh

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
#!/usr/bin/env bash
22

3-
RELEASE=0.4.0
3+
RELEASE=0.5.0
44
dist=dist
55
bin=oauth-proxy
66

proxy/proxy.go

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,7 @@
11
package proxy
22

33
import (
4+
"crypto/tls"
45
"math/rand"
56
"net/http"
67
"net/http/httputil"
@@ -70,8 +71,11 @@ func (p *Proxy) IsWhiteList(method, path string) bool {
7071
}
7172

7273
func (p *Proxy) createReverseProxy() {
74+
transport := http.DefaultTransport.(*http.Transport)
75+
transport.TLSClientConfig = &tls.Config{InsecureSkipVerify: true}
7376
p.reverseProxy = &httputil.ReverseProxy{
74-
Director: p.transformRequest,
77+
Director: p.transformRequest,
78+
Transport: transport,
7579
}
7680
}
7781

service/misc.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@ import (
66
)
77

88
func Version() string {
9-
return "0.4.0"
9+
return "0.5.0"
1010
}
1111

1212
func generateRandomState() (string, error) {

0 commit comments

Comments
 (0)