connect-link ("Połącz z IWSN") is a panel action: only from the site's own origin (adminSameOrigin), like connect and disconnect
Co-Authored-By: Claude Opus 5.5 <[email protected]>
This commit is contained in:
co-authored by
Claude Opus 5.5
parent
9ca563e2af
commit
be30812423
+1
-1
@@ -422,7 +422,7 @@ Routes (all four need the `admin` role: not logged in → 401, other role → 40
|
||||
| `GET /api/iapl/mail-relay/status` | the transport and the stored state; `?refresh=1` asks the service |
|
||||
| `POST /api/iapl/mail-relay/connect` | enrol now; with `{ token }` store a token issued by hand — only with `accessKeyField: true`, otherwise `403` |
|
||||
| `POST /api/iapl/mail-relay/disconnect` | give the token up |
|
||||
| `POST /api/iapl/mail-relay/connect-link` | "Połącz z IWSN": asks the service for the confirmation link (`POST /v1/connect`, enrolling first when there is no token) and answers it as `connectUrl` + `expiresAt`, `Cache-Control: no-store`; nothing is stored. Absent with `connectButton: false` (`RELAY_CONNECT_LINK_PATH`) |
|
||||
| `POST /api/iapl/mail-relay/connect-link` | "Połącz z IWSN": asks the service for the confirmation link (`POST /v1/connect`, enrolling first when there is no token) and answers it as `connectUrl` + `expiresAt`, `Cache-Control: no-store`; nothing is stored. Admin only, from the site's own origin (`adminSameOrigin`). Absent with `connectButton: false` (`RELAY_CONNECT_LINK_PATH`) |
|
||||
| `POST /api/iapl/mail-relay/confirm` | **public** — the service's call-back. `404` and no change unless the site itself started an enrolment in the last 5 minutes; **refused** calls are rate-limited (10 a minute per address, `mail.relay.confirmRateLimit`) — a call that carries the nonce is never turned away by the limit, so junk from the same address cannot keep the site from enrolling |
|
||||
|
||||
These are the first routes under `/api/iapl/`; the others stay under `/api/ipal/` until 2.0. The confirm path is
|
||||
|
||||
Reference in New Issue
Block a user