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:
Radosław Smoliński
2026-12-01 23:00:52 +01:00
co-authored by Claude Opus 5.5
parent 9ca563e2af
commit be30812423
4 changed files with 6 additions and 4 deletions
+2 -1
View File
@@ -3,7 +3,7 @@ import type { Config, Endpoint, PayloadRequest } from 'payload'
import { COOKIE_APPROVAL_PATH } from '../consent/scanner/approval.js'
import { COOKIE_CRAWL_PATH } from '../consent/scanner/crawl/config.js'
import { COOKIE_SCAN_PATH } from '../consent/scanner/endpoint.js'
import { RELAY_CONNECT_PATH, RELAY_DISCONNECT_PATH } from '../email/relay/constants.js'
import { RELAY_CONNECT_LINK_PATH, RELAY_CONNECT_PATH, RELAY_DISCONNECT_PATH } from '../email/relay/constants.js'
import { reportRefusedOrigin, requestFromOwnOrigin } from './totp/sameOrigin.js'
/**
@@ -26,6 +26,7 @@ export type AdminSameOriginOption = {
/** The panel actions the rule covers: method and path (relative to the API route). */
export const ADMIN_POST_ENDPOINTS: ReadonlyArray<readonly ['post', string]> = [
['post', RELAY_CONNECT_PATH],
['post', RELAY_CONNECT_LINK_PATH],
['post', RELAY_DISCONNECT_PATH],
['post', '/ipal/test-email'],
['post', COOKIE_SCAN_PATH],