@platformatic/gateway 3.45.0 → 3.46.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/config.d.ts +1 -0
- package/lib/capability.js +7 -2
- package/lib/proxy.js +4 -0
- package/lib/schema.js +1 -0
- package/package.json +7 -7
- package/schema.json +4 -1
package/config.d.ts
CHANGED
package/lib/capability.js
CHANGED
|
@@ -41,8 +41,13 @@ export class GatewayCapability extends ServiceCapability {
|
|
|
41
41
|
|
|
42
42
|
const url = await super.start()
|
|
43
43
|
|
|
44
|
-
|
|
45
|
-
|
|
44
|
+
// Only register the runtime event handler once. start() can be called
|
|
45
|
+
// multiple times (first with listen:false, then listen:true) so guard
|
|
46
|
+
// against duplicate registrations.
|
|
47
|
+
if (!this.#runtimeEventHandler) {
|
|
48
|
+
this.#runtimeEventHandler = this.#handleRuntimeEvent.bind(this)
|
|
49
|
+
globalThis[kITC]?.on('runtime:event', this.#runtimeEventHandler)
|
|
50
|
+
}
|
|
46
51
|
|
|
47
52
|
return url
|
|
48
53
|
}
|
package/lib/proxy.js
CHANGED
|
@@ -50,6 +50,10 @@ async function resolveApplicationProxyParameters (application, root) {
|
|
|
50
50
|
}
|
|
51
51
|
}
|
|
52
52
|
|
|
53
|
+
if (typeof application.proxy?.rewriteLocationHeader === 'boolean') {
|
|
54
|
+
internalRewriteLocationHeader = application.proxy.rewriteLocationHeader
|
|
55
|
+
}
|
|
56
|
+
|
|
53
57
|
const require = createRequire(import.meta.filename)
|
|
54
58
|
|
|
55
59
|
if (application.proxy?.custom) {
|
package/lib/schema.js
CHANGED
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@platformatic/gateway",
|
|
3
|
-
"version": "3.
|
|
3
|
+
"version": "3.46.0",
|
|
4
4
|
"description": "",
|
|
5
5
|
"main": "index.js",
|
|
6
6
|
"types": "index.d.ts",
|
|
@@ -32,7 +32,7 @@
|
|
|
32
32
|
"typescript": "^5.5.4",
|
|
33
33
|
"why-is-node-running": "2",
|
|
34
34
|
"ws": "^8.16.0",
|
|
35
|
-
"@platformatic/db": "3.
|
|
35
|
+
"@platformatic/db": "3.46.0"
|
|
36
36
|
},
|
|
37
37
|
"dependencies": {
|
|
38
38
|
"@fastify/error": "^4.0.0",
|
|
@@ -63,11 +63,11 @@
|
|
|
63
63
|
"rfdc": "^1.3.1",
|
|
64
64
|
"semgrator": "^0.3.0",
|
|
65
65
|
"undici": "^7.0.0",
|
|
66
|
-
"@platformatic/basic": "3.
|
|
67
|
-
"@platformatic/
|
|
68
|
-
"@platformatic/
|
|
69
|
-
"@platformatic/service": "3.
|
|
70
|
-
"@platformatic/telemetry": "3.
|
|
66
|
+
"@platformatic/basic": "3.46.0",
|
|
67
|
+
"@platformatic/scalar-theme": "3.46.0",
|
|
68
|
+
"@platformatic/foundation": "^3.46.0",
|
|
69
|
+
"@platformatic/service": "3.46.0",
|
|
70
|
+
"@platformatic/telemetry": "3.46.0"
|
|
71
71
|
},
|
|
72
72
|
"engines": {
|
|
73
73
|
"node": ">=22.19.0"
|
package/schema.json
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
{
|
|
2
|
-
"$id": "https://schemas.platformatic.dev/@platformatic/gateway/3.
|
|
2
|
+
"$id": "https://schemas.platformatic.dev/@platformatic/gateway/3.46.0.json",
|
|
3
3
|
"$schema": "http://json-schema.org/draft-07/schema#",
|
|
4
4
|
"title": "Platformatic Gateway Config",
|
|
5
5
|
"type": "object",
|
|
@@ -840,6 +840,9 @@
|
|
|
840
840
|
"rewritePrefix": {
|
|
841
841
|
"type": "string"
|
|
842
842
|
},
|
|
843
|
+
"rewriteLocationHeader": {
|
|
844
|
+
"type": "boolean"
|
|
845
|
+
},
|
|
843
846
|
"hostname": {
|
|
844
847
|
"type": "string"
|
|
845
848
|
},
|