@rpcbase/server 0.23.0 → 0.27.0

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.
Files changed (2) hide show
  1. package/express/index.js +6 -2
  2. package/package.json +1 -1
package/express/index.js CHANGED
@@ -5,8 +5,8 @@ const body_parser = require("body-parser")
5
5
 
6
6
  const session = require("./session")
7
7
 
8
- const {APP_DOMAIN} = process.env
9
8
  const is_production = process.env.IS_PRODUCTION === "yes"
9
+ const {APP_DOMAIN, CLIENT_PORT} = process.env
10
10
 
11
11
 
12
12
  module.exports = () => {
@@ -27,7 +27,11 @@ module.exports = () => {
27
27
  })
28
28
 
29
29
  // CORS
30
- const cors_origins = is_production ? [`*.${APP_DOMAIN}`, APP_DOMAIN] : ["*"]
30
+ const cors_origins = is_production ?
31
+ [`*.${APP_DOMAIN}`, APP_DOMAIN] :
32
+ "*"
33
+ // [`http://localhost:${CLIENT_PORT}`, "localhost"]
34
+ console.log("SETUP CORS", cors_origins)
31
35
  app.use(cors({
32
36
  origin: cors_origins,
33
37
  methods: ["GET", "POST"],
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@rpcbase/server",
3
- "version": "0.23.0",
3
+ "version": "0.27.0",
4
4
  "license": "SSPL-1.0",
5
5
  "main": "./index.js",
6
6
  "bin": {