Skip to content
Toggle navigation
Projects
Groups
Snippets
Help
xuzhenhao
/
xuzhenhao-dev-icesimbapolysdklogin
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 2bdcb27e
authored
Dec 13, 2017
by
xuzhenhao
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
修改了返回头
1 parent
15c300e5
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
4 additions
and
4 deletions
src/loginserver/router.go
src/loginserver/router.go
View file @
2bdcb27
...
...
@@ -11,10 +11,10 @@ import (
func
initRouter
()
*
gin
.
Engine
{
router
:=
gin
.
Default
()
config
:=
cors
.
DefaultConfig
()
config
.
AllowOrigins
=
[]
string
{
"http://127.0.0.1:8000
"
}
config
.
AllowCredentials
=
true
router
.
Use
(
cors
.
New
(
config
))
//
config := cors.DefaultConfig()
// config.AllowOrigins = []string{"http://127.0.0.1:8000", "http://47.95.36.186:8000", "http://47.95.36.186:8402", "http://47.95.36.186:8401
"}
//
config.AllowCredentials = true
router
.
Use
(
cors
.
Default
(
))
router
.
POST
(
"user/login"
,
UserLoginApi
)
router
.
POST
(
"user/register"
,
UserRegisterApi
)
router
.
POST
(
"user/checkusername"
,
CheckUserNameRepeatApi
)
...
...
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