Skip to content

Pair the example's scheme with the dev server's - #107

Merged
kisielewski merged 1 commit into
mainfrom
docs/what-two-origins-require
Sep 6, 2026
Merged

Pair the example's scheme with the dev server's#107
kisielewski merged 1 commit into
mainfrom
docs/what-two-origins-require

Conversation

@kisielewski

Copy link
Copy Markdown
Member

.env.example shipped VITE_APP_API_BASE_URL=https://localhost:7004 beside
VITE_DOTNET_CERT=false — a page over HTTP against an API over HTTPS.

A browser counts http://localhost and https://localhost as two different
sites, and the session cookie is SameSite=Lax, so a developer who copied the
file could not sign in: POST /identity/login answers 200 and sends a
Set-Cookie, the browser stores nothing, the next call is 401, and the
screen stays on the login form with no error anywhere.

Points it at http://localhost:5171, which the Server's own launch profile
serves beside 7004, and says at both variables that the schemes have to agree.
The port never mattered — only the scheme and the host.

Also records in CLAUDE.md, beside the existing note about /api/v1, that a
different origin is fine and a different site is not, and that a file is
reached by fileApi.url(fileId) rather than by an address the Server composed.

Documentation only. Pairs with AlgoJudge/AlgoJudge-Ops and
AlgoJudge/AlgoJudge-Docs, which say the same thing to an operator.

`http://localhost` and `https://localhost` are two sites to a cookie, so the
example as it stood could not sign in. Records the rule beside the API base.
@kisielewski
kisielewski merged commit 1dae409 into main Sep 6, 2026
3 checks passed
@kisielewski
kisielewski deleted the docs/what-two-origins-require branch September 6, 2026 22:03
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