Skip to content
Toggle navigation
P
Projects
G
Groups
S
Snippets
Help
haoqu.ma
/
gotty
This project
Loading...
Sign in
Toggle navigation
Go to a project
Project
Repository
Issues
0
Merge Requests
0
Pipelines
Wiki
Snippets
Settings
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Commit 84ec13ca
authored
Aug 13, 2017
by
Iwasaki Yudai
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Do not show ws log
1 parent
af411114
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
2 additions
and
2 deletions
server/server.go
server/server.go
View file @
84ec13c
...
@@ -182,14 +182,14 @@ func (server *Server) setupHandlers(ctx context.Context, cancel context.CancelFu
...
@@ -182,14 +182,14 @@ func (server *Server) setupHandlers(ctx context.Context, cancel context.CancelFu
siteHandler
=
server
.
wrapBasicAuth
(
siteHandler
,
server
.
options
.
Credential
)
siteHandler
=
server
.
wrapBasicAuth
(
siteHandler
,
server
.
options
.
Credential
)
}
}
siteHandler
=
server
.
wrap
Headers
(
siteHandler
)
siteHandler
=
server
.
wrap
Logger
(
server
.
wrapHeaders
(
siteHandler
)
)
wsMux
:=
http
.
NewServeMux
()
wsMux
:=
http
.
NewServeMux
()
wsMux
.
Handle
(
"/"
,
siteHandler
)
wsMux
.
Handle
(
"/"
,
siteHandler
)
wsMux
.
HandleFunc
(
url
.
Path
+
"ws"
,
server
.
generateHandleWS
(
ctx
,
cancel
,
counter
))
wsMux
.
HandleFunc
(
url
.
Path
+
"ws"
,
server
.
generateHandleWS
(
ctx
,
cancel
,
counter
))
siteHandler
=
http
.
Handler
(
wsMux
)
siteHandler
=
http
.
Handler
(
wsMux
)
return
s
erver
.
wrapLogger
(
siteHandler
)
return
s
iteHandler
}
}
func
(
server
*
Server
)
setupHTTPServer
(
handler
http
.
Handler
,
url
*
url
.
URL
)
(
*
http
.
Server
,
error
)
{
func
(
server
*
Server
)
setupHTTPServer
(
handler
http
.
Handler
,
url
*
url
.
URL
)
(
*
http
.
Server
,
error
)
{
...
...
Write
Preview
Markdown
is supported
Attach a file
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to post a comment