q-koa 8.4.1 → 8.4.2

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -8,9 +8,11 @@ const superAdmin = {
8
8
 
9
9
  exports.login = async (ctx) => {
10
10
  const { app, appName } = getAppByCtx(ctx)
11
- const { host } = ctx.request
12
11
  const { name, password } = ctx.request.body
13
- const is_dev = host.startsWith('localhost')
12
+ const { host, header } = ctx.request
13
+ const is_dev =
14
+ host.startsWith('localhost') ||
15
+ (header.referer && header.referer.includes('is_dev=true'))
14
16
  const permissionList = await app.model.permission.findAll({
15
17
  attributes: {
16
18
  exclude: ['createdid', 'updated_at', 'created_at', 'name'],
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "q-koa",
3
- "version": "8.4.1",
3
+ "version": "8.4.2",
4
4
  "description": "",
5
5
  "main": "index.js",
6
6
  "scripts": {