Set the site address in the administration, checked against the installation itself

- System > This installation > Address has a field and a link to the other
  spelling (with or without www), like the WordPress address. It writes
  SITE_ORIGIN to .env through Environment::write and takes effect on the
  next request. With SITE_ORIGIN from the server environment there is no
  field, and a POST is refused.
- Before saving, OriginCheck requests /.well-known/kantsites-origin under the
  new address; it has to return an HMAC of APP_SECRET that only this
  installation knows. Switching to www without DNS or certificate would
  otherwise send every page, the administration included, nowhere. "Save
  anyway" appears only after a refusal. The probe also answers during
  maintenance.
- The message says when the administration changes host and needs a new
  sign-in, since the session cookie belongs to one spelling.

Tests: 584 PHPUnit on PHP 8.2 and 8.4, 35 node, test:editor and
test:browser green (test:browser reports only the known editor colour
contrast on /grundlagen).

Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
This commit is contained in:
kantarciandClaude Opus 5 committed 2026-09-21 08:36:38 +02:00
1 parent e21e800f2c
commit 3b1dfc0948
10 files changed
+238 -7

No files matched your search

+5
View File
@@ -79,6 +79,11 @@ services:
$projectDir: '%kernel.project_dir%'
$adminPath: '%kant.admin_path%'
$environment: '%kernel.environment%'
# Eigene kurze Zeitgrenzen statt des Download-Dienstes mit denen fuer Releasearchive.
App\Ops\OriginCheck:
arguments:
$secret: '%kernel.secret%'
$download: null
App\Command\SiteOriginCommand:
arguments:
$projectDir: '%kernel.project_dir%'