Skip to content

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

Merged
davidmckayv merged 1 commit into
CopilotKit:mainfrom
Ayush7614:fix/worker-server-url-validation
Sep 6, 2026
Merged

fix(worker): refuse a SERVER_INTERNAL_URL that is not a valid http(s) URL#389
davidmckayv merged 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.

@davidmckayv davidmckayv left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Refuses a non-http(s) SERVER_INTERNAL_URL at worker boot (fail-closed), after the trailing-slash normalization. Read against live code + deep review: valid URLs pass, no new deps. CI approved.

@davidmckayv
davidmckayv merged commit 2a94221 into CopilotKit:main Sep 6, 2026
14 checks passed
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.

2 participants