@rpcbase/server 0.186.0 → 0.188.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.
package/express/index.js CHANGED
@@ -52,6 +52,8 @@ module.exports = () => {
52
52
  `https://www.${APP_DOMAIN}`,
53
53
  `https://${APP_DOMAIN}`,
54
54
  `https://admin.${APP_DOMAIN}`,
55
+ `https://app.posthog.com`,
56
+ `https://eu.posthog.com`,
55
57
  ] :
56
58
  // local dev origins
57
59
  [
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@rpcbase/server",
3
- "version": "0.186.0",
3
+ "version": "0.188.0",
4
4
  "license": "SSPL-1.0",
5
5
  "main": "./index.js",
6
6
  "bin": {
@@ -38,6 +38,8 @@ const client_router = (app) => {
38
38
  app.get("*", async_wrapper(async(req, res, next) => {
39
39
  const full_path = req.baseUrl + req.path
40
40
 
41
+ // TODO: this shouldn't be here,
42
+ // it should be handled by the api and rpc routers being declared before this router
41
43
  if (full_path.startsWith("/api/") || full_path.startsWith("/rpc/")) {
42
44
  return next()
43
45
  }
@@ -46,6 +48,7 @@ const client_router = (app) => {
46
48
  const file_path = path.join(client_build_dir, full_path)
47
49
  return res.sendFile(file_path)
48
50
  } else {
51
+ // TODO: should handle 404 here
49
52
  res.writeHead(200, {
50
53
  "Content-Type": "text/html"
51
54
  })