Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion deno.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@deco/deco",
"version": "1.132.4",
"version": "1.132.4-beta",
"lock": false,
"exports": {
".": "./mod.ts",
Expand Down
2 changes: 1 addition & 1 deletion dev/deno.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@deco/dev",
"version": "1.132.4",
"version": "1.132.4-beta",
"exports": {
"./tailwind": "./tailwind.ts"
},
Expand Down
6 changes: 4 additions & 2 deletions runtime/routes/release.ts
Original file line number Diff line number Diff line change
@@ -1,14 +1,16 @@
import { setCSPHeaders } from "../../utils/http.ts";
import { createHandler } from "../middleware.ts";

export const handler = createHandler(async (
{ var: state },
{ var: state, req },
) => {
return new Response(
const response = new Response(
JSON.stringify(await state.release.state()),
{
headers: {
"Content-Type": "application/json",
},
},
);
return setCSPHeaders(req.raw, response);
Comment on lines +7 to +15
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

⚠️ Potential issue | 🟡 Minor

🧩 Analysis chain

🏁 Script executed:

#!/bin/bash
# Search for decofile references
rg -nP --type=ts -C3 'decofile'

# Search for route registration or mapping that might clarify the relationship
rg -nP --type=ts -C3 'release.*route|decofile.*route'

Repository: deco-cx/deco

Length of output: 24629


Confirmed: release.ts is the decofile route. Consider applying CSP headers to reload.ts as well.

The release route is correctly mapped to handle the /.decofile path in runtime/handler.tsx. However, runtime/routes/reload.ts also handles decofile operations at /.decofile/reload. For consistency, it should also apply setCSPHeaders to its response.

🤖 Prompt for AI Agents
In runtime/routes/reload.ts around the corresponding response return (similar to
lines 7-15 in runtime/routes/release.ts), the handler currently returns a
Response directly without applying CSP headers; update the handler to wrap the
response with setCSPHeaders(req.raw, response) before returning, mirroring
release.ts, and ensure setCSPHeaders is imported from its module if not already.

});
2 changes: 1 addition & 1 deletion scripts/deno.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@deco/scripts",
"version": "1.132.4",
"version": "1.132.4-beta",
"exports": {
"./release": "./release.ts",
"./update": "./update.run.ts",
Expand Down
Loading