Skip to content

Commit 150b74a

Browse files
committed
Capture web app version
1 parent 7966d83 commit 150b74a

File tree

3 files changed

+5
-2
lines changed

3 files changed

+5
-2
lines changed

package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
{
22
"name": "labelzoom-cf-api-proxy",
33
"description": "A Cloudflare Worker that serves as a reverse proxy for LabelZoom's public REST API",
4-
"version": "1.2.0",
4+
"version": "1.2.1",
55
"private": true,
66
"dependencies": {
77
"hono": "4.7.7",

src/worker/constants.ts

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -11,6 +11,9 @@ ON
1111
p.id = pv.product_id
1212
WHERE
1313
p.name = 'LabelZoom Studio'
14+
AND p.enabled = 1
15+
AND pv.enabled = 1
16+
AND pvv.enabled = 1
1417
ORDER BY
1518
pvv.major DESC,
1619
pvv.minor DESC,

src/worker/index.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -38,7 +38,7 @@ const app = new Hono<{ Bindings: Env }>();
3838
app.use("/api/*", (c, next) => {
3939
return cors({
4040
origin: c.env.LZ_ALLOWED_ORIGINS,
41-
allowHeaders: [],
41+
allowHeaders: ['X-LZ-AppVersion'],
4242
allowMethods: ['GET', 'HEAD', 'POST', 'PUT', 'DELETE', 'OPTIONS'],
4343

4444
/* CORS-safelisted response headers:

0 commit comments

Comments
 (0)