mirror of
https://github.com/nadoo/glider.git
synced 2026-11-19 07:09:42 +08:00
ws: allow to set Origin header and default to nil
This commit is contained in:
1 parent
8a2e95b17e
commit
4887089a4b
6 files changed
+12
-8
No files matched your search
@@ -21,6 +21,7 @@ type WS struct {
|
||||
addr string
|
||||
host string
|
||||
path string
|
||||
origin string
|
||||
|
||||
server proxy.Server
|
||||
}
|
||||
@@ -46,6 +47,7 @@ func NewWS(s string, d proxy.Dialer, p proxy.Proxy) (*WS, error) {
|
||||
addr: addr,
|
||||
host: u.Query().Get("host"),
|
||||
path: u.Path,
|
||||
origin: u.Query().Get("origin"),
|
||||
}
|
||||
|
||||
if w.host == "" {
|
||||
|
||||
Reference in new issue
Block a user