Skip to content

fix(worker): refuse a SERVER_INTERNAL_URL that is not a valid http(s) URL - #389

Open
Ayush7614 wants to merge 1 commit into
CopilotKit:mainfrom
Ayush7614:fix/worker-server-url-validation
Open

fix(worker): refuse a SERVER_INTERNAL_URL that is not a valid http(s) URL#389
Ayush7614 wants to merge 1 commit into
CopilotKit:mainfrom
Ayush7614:fix/worker-server-url-validation

Conversation

@Ayush7614

Copy link
Copy Markdown
Contributor

loadWorkerEnv only refused an empty or all-slash SERVER_INTERNAL_URL, so values like not-a-url or ftp://files/x passed boot and then failed every 30s sweep tick with a fetch TypeError logged as routine-sweep-tick-failed instead of a boot error.

Validates the normalised URL with new URL() and requires http(s), throwing a fail-fast boot error otherwise. Verified: all 17 existing worker env tests pass; not-a-url, ://bad, ftp: and padded junk are refused, http/https/trailing-slash URLs accepted.

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

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant