
Security News
GitHub Actions Checkout Now Blocks Risky pull_request_target Checkouts
GitHub Actions checkout now blocks risky pull_request_target checkouts by default to help prevent pwn request supply chain attacks.
1. 更新light-api-mongo 插件依赖
1. 更新light-api-mongo 插件依赖
1. 更新light-api-mongo 插件依赖
1. 更新light-api-mongo 插件依赖
1. 更新light-api-mongo 插件依赖1.0.9
2. 增加cookie的配置
1. 更新light-api-mongo 插件依赖1.0.10
1. 修复cookie的配置从在的缺陷
1. 修复权限插件注册后不能生效的缺陷
1. 升级light-api-redis插件依赖1.0.2
1. 升级light-api-mongo插件依赖1.0.11
1. 升级light-api-mysql插件依赖1.0.4
1. 升级light-api-mysql插件依赖1.0.5
1. 升级light-api-mysql插件依赖1.0.6
1. 升级light-api-mysql插件依赖1.0.7
2. 升级light-api-mongo插件依赖1.0.12
3. 新增api文档配置项
```json
//原有的配置
{
"port":9000,
"documentation":true
}
//更新配置
{
"port":9000,
"documentation":true,
"docHost":"www.xxx.com",
"docBasePath":"/base"
}
//说明:
docHost : 可选配置,文档中调用api地址的host
docBasePath: 可选配置,文档资源增(文档中的api地址)加根路径,方便代理使用
```
增加错误编码返回函数 replay.errNo(errNo);
使用
//配置
...
"customConfig":{
fileWhiteList:fileWhiteList,
errNoMeta:{1000:'未登录'} //配置错误编码元数据表
},
...
//调用
在handler里面直接使用
reply.errNo(1000);
1. server.json 增加访问控制的配置
```json
//原有的配置
{
"port":9000,
"documentation":true,
"docHost":"www.xxx.com",
"docBasePath":"/base"
}
//更新配置
{
"port":9000,
"documentation":true,
"docHost":"www.xxx.com",
"docBasePath":"/base",
"routes":{
"cors":{
"origin":["*"],//['http://localhost:4000']
"credentials":true
}
}
}
//说明:
routes : 访问控制配置
cors: 跨域配置
origin:相当于Access-Control-Allow-Origin
credentials:cookie跨域凭证 相当于Access-Control-Allow-Credentials
```
FAQs
this is a RESTful-API server
The npm package light-api receives a total of 4 weekly downloads. As such, light-api popularity was classified as not popular.
We found that light-api demonstrated a not healthy version release cadence and project activity because the last version was released a year ago. It has 1 open source maintainer collaborating on the project.
Did you know?

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Security News
GitHub Actions checkout now blocks risky pull_request_target checkouts by default to help prevent pwn request supply chain attacks.

Product
Socket now supports Custom Roles and Repository Access Permissions so organizations can control who can access specific repositories and actions.

Product
Socket MCP now lets AI assistants review org alerts, investigate threats using the Socket threat feed, and inspect package files in addition to dependency scoring.