Skip to content
Toggle navigation
Projects
Groups
Snippets
Help
front-document
/
front-server
This project
Loading...
Sign in
Toggle navigation
Go to a project
Project
Repository
Issues
0
Merge Requests
0
Pipelines
Wiki
Settings
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Commit 26fdf7bc
authored
Feb 28, 2022
by
luyt
Browse Files
Options
Browse Files
Tag
Download
Email Patches
Plain Diff
delete:去除跨域配置,nginx已做处理
1 parent
08cfcf40
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
16 additions
and
16 deletions
config/config.default.js
config/plugin.js
config/config.default.js
View file @
26fdf7b
...
@@ -18,18 +18,18 @@ module.exports = appInfo => {
...
@@ -18,18 +18,18 @@ module.exports = appInfo => {
domainWhiteList
:
[
'*'
]
domainWhiteList
:
[
'*'
]
// domainWhiteList: ["http://localhost:8080", "http://192.168.2.9:8080","http://glsk-front.test.glsx.com.cn",] //允许访问接口的白名单
// domainWhiteList: ["http://localhost:8080", "http://192.168.2.9:8080","http://glsk-front.test.glsx.com.cn",] //允许访问接口的白名单
};
};
config
.
cors
=
{
//
config.cors = {
// 任何地址都可以访问
//
// 任何地址都可以访问
// origin: ctx => ctx.get('origin'), //这种方式是允许所有的IP+端口跨域访问
//
// origin: ctx => ctx.get('origin'), //这种方式是允许所有的IP+端口跨域访问
// 任何地址都可以访问
//
// 任何地址都可以访问
origin
:
"*"
,
//
origin:"*",
// 指定地址才可以访问
//
// 指定地址才可以访问
// origin: 'http://localhost:8080',
//
// origin: 'http://localhost:8080',
// allowMethods: 'GET,HEAD,PUT,POST,DELETE,PATCH,OPTIONS',
//
// allowMethods: 'GET,HEAD,PUT,POST,DELETE,PATCH,OPTIONS',
allowMethods
:
'*'
,
//
allowMethods: '*',
// cookie跨域配置
//
// cookie跨域配置
credentials
:
true
,
//
credentials: true,
};
//
};
return
config
return
config
}
}
\ No newline at end of file
\ No newline at end of file
config/plugin.js
View file @
26fdf7b
...
@@ -3,10 +3,10 @@ module.exports = {
...
@@ -3,10 +3,10 @@ module.exports = {
enable
:
true
,
enable
:
true
,
package
:
'egg-sequelize'
,
package
:
'egg-sequelize'
,
},
},
cors
:{
//
cors:{
enable
:
true
,
//
enable: true,
package
:
'egg-cors'
,
//
package: 'egg-cors',
}
//
}
}
}
// exports.sequelize = {
// exports.sequelize = {
// enable: true,
// enable: true,
...
...
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