Feat/convertx embed 16650462168991176367 - #589
Conversation
- Created `ConvertXEmbed.tsx` for easy iframe embedding in other websites - Updated authentication and job ID cookies to use `SameSite: none` conditionally when HTTPS is forced, allowing the session to persist across cross-origin iframe instances - Added global `Referrer-Policy: no-referrer` header in Elysia backend to enhance privacy and mask Cloudflare/proxy details - Updated `README.md` documenting the Dokploy+Cloudflare deployment and how to use the new `ConvertXEmbed` component Co-authored-by: cookiebaits <186959723+cookiebaits@users.noreply.github.com>
- Created ConvertXEmbed.tsx for easy iframe embedding in other websites - Updated authentication and job ID cookies to use SameSite: none conditionally when HTTPS is forced, allowing the session to persist across cross-origin iframe instances - Added global Referrer-Policy: no-referrer header in Elysia backend to enhance privacy and mask Cloudflare/proxy details - Updated README.md documenting the Dokploy+Cloudflare deployment and how to use the new ConvertXEmbed component Co-authored-by: cookiebaits <186959723+cookiebaits@users.noreply.github.com>
- Created ConvertXEmbed.tsx for easy iframe embedding in other websites - Updated authentication and job ID cookies to use SameSite: none conditionally when HTTPS is forced, allowing the session to persist across cross-origin iframe instances - Added global Referrer-Policy: no-referrer header in Elysia backend to enhance privacy and mask Cloudflare/proxy details - Updated README.md documenting the Dokploy+Cloudflare deployment and how to use the new ConvertXEmbed component Co-authored-by: cookiebaits <186959723+cookiebaits@users.noreply.github.com>
There was a problem hiding this comment.
3 issues found across 4 files
Prompt for AI agents (unresolved issues)
Check if these issues are valid — if so, understand the root cause of each and fix them. If appropriate, use sub-agents to investigate and fix each issue separately.
<file name="src/pages/user.tsx">
<violation number="1" location="src/pages/user.tsx:231">
P1: Authenticated cross-site POSTs now include `auth`, so a malicious site can trigger deletion/conversion requests in a logged-in user's session. Preserve CSRF protection for non-embedded sessions or add a validated CSRF/origin mechanism before using `SameSite=None`.</violation>
<violation number="2" location="src/pages/user.tsx:231">
P1: The `/register` POST handler was updated to use a dynamic `sameSite` value for embed support (`"none"` on HTTPS, `"lax"` on HTTP), but the `/login` POST handler in the same file still sets `sameSite: "strict"`. Both handlers set the identical `auth` cookie for the same session-token purpose, so they must use consistent cookie attributes. Users who log in will get a `SameSite=Strict` cookie that won't be sent on cross-origin embed requests, defeating the embed feature for the login flow. Apply the same conditional `sameSite` logic to the login handler.</violation>
</file>
<file name="agent.md">
<violation number="1" location="agent.md:1">
P1: agent.md has broken markdown structure: every line that begins with '# ' renders as an H1 heading, so the entire file is a flat list of H1 elements. Body paragraphs, numbered lists, and subheadings are all flattened, making the document unreadable as structured markdown. Remove the leading '# ' prefix from body-text lines and remove '\#' escaping from intended headings.</violation>
</file>
Reply with feedback, questions, or to request a fix.
Re-trigger cubic
| secure: !HTTP_ALLOWED, | ||
| maxAge: 60 * 60 * 24 * 7, | ||
| sameSite: "strict", | ||
| sameSite: !HTTP_ALLOWED ? "none" : "lax", |
There was a problem hiding this comment.
P1: Authenticated cross-site POSTs now include auth, so a malicious site can trigger deletion/conversion requests in a logged-in user's session. Preserve CSRF protection for non-embedded sessions or add a validated CSRF/origin mechanism before using SameSite=None.
Prompt for AI agents
Check if this issue is valid — if so, understand the root cause and fix it. At src/pages/user.tsx, line 231:
<comment>Authenticated cross-site POSTs now include `auth`, so a malicious site can trigger deletion/conversion requests in a logged-in user's session. Preserve CSRF protection for non-embedded sessions or add a validated CSRF/origin mechanism before using `SameSite=None`.</comment>
<file context>
@@ -228,7 +228,7 @@ export const user = new Elysia()
secure: !HTTP_ALLOWED,
maxAge: 60 * 60 * 24 * 7,
- sameSite: "strict",
+ sameSite: !HTTP_ALLOWED ? "none" : "lax",
});
</file context>
| @@ -0,0 +1,65 @@ | |||
| # \# Universal AI Developer Instructions | |||
There was a problem hiding this comment.
P1: agent.md has broken markdown structure: every line that begins with '# ' renders as an H1 heading, so the entire file is a flat list of H1 elements. Body paragraphs, numbered lists, and subheadings are all flattened, making the document unreadable as structured markdown. Remove the leading '# ' prefix from body-text lines and remove '#' escaping from intended headings.
Prompt for AI agents
Check if this issue is valid — if so, understand the root cause and fix it. At agent.md, line 1:
<comment>agent.md has broken markdown structure: every line that begins with '# ' renders as an H1 heading, so the entire file is a flat list of H1 elements. Body paragraphs, numbered lists, and subheadings are all flattened, making the document unreadable as structured markdown. Remove the leading '# ' prefix from body-text lines and remove '\#' escaping from intended headings.</comment>
<file context>
@@ -0,0 +1,65 @@
+# \# Universal AI Developer Instructions
+
+#
</file context>
| secure: !HTTP_ALLOWED, | ||
| maxAge: 60 * 60 * 24 * 7, | ||
| sameSite: "strict", | ||
| sameSite: !HTTP_ALLOWED ? "none" : "lax", |
There was a problem hiding this comment.
P1: The /register POST handler was updated to use a dynamic sameSite value for embed support ("none" on HTTPS, "lax" on HTTP), but the /login POST handler in the same file still sets sameSite: "strict". Both handlers set the identical auth cookie for the same session-token purpose, so they must use consistent cookie attributes. Users who log in will get a SameSite=Strict cookie that won't be sent on cross-origin embed requests, defeating the embed feature for the login flow. Apply the same conditional sameSite logic to the login handler.
Prompt for AI agents
Check if this issue is valid — if so, understand the root cause and fix it. At src/pages/user.tsx, line 231:
<comment>The `/register` POST handler was updated to use a dynamic `sameSite` value for embed support (`"none"` on HTTPS, `"lax"` on HTTP), but the `/login` POST handler in the same file still sets `sameSite: "strict"`. Both handlers set the identical `auth` cookie for the same session-token purpose, so they must use consistent cookie attributes. Users who log in will get a `SameSite=Strict` cookie that won't be sent on cross-origin embed requests, defeating the embed feature for the login flow. Apply the same conditional `sameSite` logic to the login handler.</comment>
<file context>
@@ -228,7 +228,7 @@ export const user = new Elysia()
secure: !HTTP_ALLOWED,
maxAge: 60 * 60 * 24 * 7,
- sameSite: "strict",
+ sameSite: !HTTP_ALLOWED ? "none" : "lax",
});
</file context>
Summary by cubic
Enables cross-origin iframe embedding by setting cookies to SameSite=None on HTTPS-only deployments. Also updates Tailwind, ESLint, and other dev dependencies.
New Features
SameSite: nonewithSecurewhen HTTPS is enforced, allowing sessions inside cross-origin iframes.agent.mdwith universal developer instructions.Dependencies
tailwindcss,@tailwindcss/cli, and@tailwindcss/postcssto4.3.3.eslintto^10.8.0,prettierto^3.9.6,postcssto^8.5.24,tarto^7.5.22, and@types/nodeto^24.13.3.Written for commit 1e05820. Summary will update on new commits.