Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
Aurora
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Package Registry
Container Registry
Model registry
Operate
Environments
Terraform modules
Monitor
Incidents
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
Zandor Smith
Aurora
Commits
c466d052
Commit
c466d052
authored
8 years ago
by
Ri Xu
Browse files
Options
Downloads
Patches
Plain Diff
Server address validate update.
parent
53c7af64
No related branches found
Branches containing commit
Tags
1.3
Tags containing commit
No related merge requests found
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
cookies.go
+3
-1
3 additions, 1 deletion
cookies.go
with
3 additions
and
1 deletion
cookies.go
+
3
−
1
View file @
c466d052
package
main
import
(
"net"
"net/http"
"net/url"
"strconv"
...
...
@@ -28,7 +29,8 @@ func readCookies(r *http.Request) {
}
for
_
,
v
:=
range
servers
{
_
,
err
:=
url
.
ParseRequestURI
(
v
)
if
err
!=
nil
{
// Server address should be a valid URL or dotted decimal IPv4 or IPv6 form.
if
err
!=
nil
&&
net
.
ParseIP
(
strings
.
Split
(
v
,
`:`
)[
0
])
==
nil
{
continue
}
selfConf
.
Servers
=
append
(
selfConf
.
Servers
,
v
)
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment