Skip to content

Avoid CORS fetch in COPY GAME! — open URL to trigger browser download - #4

Open
ReedonMenu wants to merge 1 commit into
mainfrom
codex/create-roblox-game-copier-with-api-key-kexrxm
Open

Avoid CORS fetch in COPY GAME! — open URL to trigger browser download#4
ReedonMenu wants to merge 1 commit into
mainfrom
codex/create-roblox-game-copier-with-api-key-kexrxm

Conversation

@ReedonMenu

Copy link
Copy Markdown
Owner

Motivation

  • The previous fetch-based download path produced CORS failures (e.g. Failed to fetch) for many Roblox URLs, preventing the expected download behavior.
  • Provide a safer, more reliable flow that relies on the browser to open or download direct file links instead of trying to fetch blobs across origins.
  • Keep the local-path handling and the PowerShell script generation for local backups intact and explicit.

Description

  • Replaced the fetch(...).blob() download path in index.html with an anchor-based flow that asks permission and opens the provided URL in a new tab, allowing the browser to perform native downloads for direct file links.
  • Adjusted the confirmation prompt text to Allow this website to open/download this URL? and improved status messages to reflect the new behavior.
  • Preserved filename extraction from the URL and set the anchor's download attribute when a filename is present to hint the browser to download.
  • Left the PowerShell .ps1 generation and local-path guidance unchanged so local copy/backups still use the existing COPY AS POWERSHELL flow.

Testing

  • Ran unit tests with python3 -m unittest -v and both tests in test_roblox_game_copier.py passed (OK).
  • Executed an automated Playwright script that served index.html, filled a Roblox URL, accepted the dialog, clicked COPY GAME!, and captured a screenshot confirming the UI no longer shows a CORS error.
  • Verified the page served locally with python3 -m http.server and the updated click/open behavior works in the browser automation run.

Codex Task

@vercel

vercel Bot commented Feb 20, 2026

Copy link
Copy Markdown

The latest updates on your projects. Learn more about Vercel for GitHub.

Project Deployment Actions Updated (UTC)
game-copier Ready Ready Preview, Comment Feb 20, 2026 1:24pm

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant