@rpcbase/server 0.143.0 → 0.145.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 +7 -2
  2. package/package.json +1 -1
package/express/index.js CHANGED
@@ -48,7 +48,6 @@ module.exports = () => {
48
48
  `https://www.${APP_DOMAIN}`,
49
49
  `https://${APP_DOMAIN}`,
50
50
  `https://admin.${APP_DOMAIN}`,
51
- APP_DOMAIN,
52
51
  ] :
53
52
  // local dev origins
54
53
  [
@@ -59,8 +58,14 @@ module.exports = () => {
59
58
  // TODO: WARNING: TMP hardcoded port
60
59
  "http://localhost:8090", // TMP: used by inspected app from admin
61
60
  "http://localhost:9292", // TMP
62
- "localhost",
63
61
  ]
62
+
63
+ if (APP_DOMAIN) {
64
+ cors_origins.push(`http://${APP_DOMAIN}`)
65
+ cors_origins.push(`https://${APP_DOMAIN}`)
66
+ }
67
+
68
+
64
69
  log("setting up cors with origins", JSON.stringify(cors_origins))
65
70
 
66
71
  app.use(cors({
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@rpcbase/server",
3
- "version": "0.143.0",
3
+ "version": "0.145.0",
4
4
  "license": "SSPL-1.0",
5
5
  "main": "./index.js",
6
6
  "bin": {