Skip to content

Commit

Permalink
fix: valid protocol error
Browse files Browse the repository at this point in the history
fixes #6069
  • Loading branch information
PatrickJS authored and wmertens committed Mar 31, 2024
1 parent 6ab865c commit 1ad4dfb
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion packages/qwik-city/static/main-thread.ts
Original file line number Diff line number Diff line change
Expand Up @@ -236,7 +236,7 @@ function validateOptions(opts: StaticGenerateOptions) {
throw new Error(`Missing "origin" option`);
}
siteOrigin = siteOrigin.trim();
if (!siteOrigin.startsWith('https://') && !siteOrigin.startsWith('http://')) {
if (!/:\/\//.test(siteOrigin) || siteOrigin.startsWith('://')) {
throw new Error(
`"origin" must start with a valid protocol, such as "https://" or "http://", received "${siteOrigin}"`
);
Expand Down

0 comments on commit 1ad4dfb

Please sign in to comment.