@platformatic/composer 2.37.0 → 2.37.1

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/lib/proxy.js CHANGED
@@ -138,7 +138,7 @@ module.exports = fp(async function (app, opts) {
138
138
  })
139
139
  }
140
140
 
141
- const toReplace = url?.replace(/127\.0\.0\.1/, 'localhost').replace(/\[::\]/, 'localhost')
141
+ const toReplace = url ? new RegExp(url.replace(/127\.0\.0\.1/, 'localhost').replace(/\[::\]/, 'localhost').replace('http://', 'https?://')) : null
142
142
 
143
143
  const proxyOptions = {
144
144
  websocket: true,
@@ -156,8 +156,10 @@ module.exports = fp(async function (app, opts) {
156
156
  rewriteHeaders: (headers) => {
157
157
  let location = headers.location
158
158
  if (location) {
159
- location = location.replace(toReplace, '')
160
- if (location && !urlPattern.test(location) && internalRewriteLocationHeader) {
159
+ if (toReplace) {
160
+ location = location.replace(toReplace, '')
161
+ }
162
+ if (!urlPattern.test(location) && internalRewriteLocationHeader) {
161
163
  location = location.replace(rewritePrefix, prefix)
162
164
  }
163
165
  headers.location = location
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@platformatic/composer",
3
- "version": "2.37.0",
3
+ "version": "2.37.1",
4
4
  "description": "",
5
5
  "main": "index.js",
6
6
  "bin": {
@@ -31,9 +31,9 @@
31
31
  "typescript": "^5.5.4",
32
32
  "why-is-node-running": "2",
33
33
  "ws": "^8.16.0",
34
- "@platformatic/client": "2.37.0",
35
- "@platformatic/db": "2.37.0",
36
- "@platformatic/config": "2.37.0"
34
+ "@platformatic/config": "2.37.1",
35
+ "@platformatic/db": "2.37.1",
36
+ "@platformatic/client": "2.37.1"
37
37
  },
38
38
  "dependencies": {
39
39
  "@fastify/error": "^4.0.0",
@@ -67,12 +67,12 @@
67
67
  "rfdc": "^1.3.1",
68
68
  "semgrator": "^0.3.0",
69
69
  "undici": "^7.0.0",
70
- "@platformatic/config": "2.37.0",
71
- "@platformatic/generators": "2.37.0",
72
- "@platformatic/scalar-theme": "2.37.0",
73
- "@platformatic/utils": "^2.37.0",
74
- "@platformatic/telemetry": "2.37.0",
75
- "@platformatic/service": "2.37.0"
70
+ "@platformatic/config": "2.37.1",
71
+ "@platformatic/generators": "2.37.1",
72
+ "@platformatic/scalar-theme": "2.37.1",
73
+ "@platformatic/service": "2.37.1",
74
+ "@platformatic/utils": "^2.37.1",
75
+ "@platformatic/telemetry": "2.37.1"
76
76
  },
77
77
  "scripts": {
78
78
  "test": "pnpm run lint && borp -T --timeout=300000 -c 1 && tsd",
package/schema.json CHANGED
@@ -1,5 +1,5 @@
1
1
  {
2
- "$id": "https://schemas.platformatic.dev/@platformatic/composer/2.37.0.json",
2
+ "$id": "https://schemas.platformatic.dev/@platformatic/composer/2.37.1.json",
3
3
  "$schema": "http://json-schema.org/draft-07/schema#",
4
4
  "title": "Platformatic Composer",
5
5
  "type": "object",