Dialog portalem do body, hlavicky odpovedi u chyby
Dialog se vykresloval uvnitr karty konektoru misto pres obrazovku. Samo position: fixed nestaci: rodic s backdrop-filter (nase .glass, tedy skoro kazdy panel a karta) je pro fixed potomka containing block. Modal proto jde portalem do document.body. Tykalo se to vsech dialogu, videt to bylo az u Logu, ktere jsou v male karte. K chybe se zapisuji vybrane hlavicky odpovedi: server, via, content-type, www-authenticate, retry-after, x-request-id, date. Rikaji, kdo odpoved vydal. Server: Kestrel je sama aplikace, Via: 1.1 Caddy proxy pred ni. U 403 od proxy byva telo prazdne a bez hlavicek by nezbylo vubec nic. Allowlist, ne vsechno: Set-Cookie a podobne do zaznamu nepatri. Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
This commit is contained in:
co-authored by
Claude Opus 5
parent
5a124a53d8
commit
ab88979627
@@ -289,6 +289,7 @@ connectorsRouter.post('/:id/test', async (req, res) => {
|
||||
message,
|
||||
detail: null,
|
||||
request: null,
|
||||
responseHeaders: null,
|
||||
},
|
||||
[tenantId],
|
||||
);
|
||||
@@ -334,6 +335,7 @@ connectorsRouter.post('/:id/test', async (req, res) => {
|
||||
message,
|
||||
detail: null,
|
||||
request,
|
||||
responseHeaders: null,
|
||||
},
|
||||
[tenantId],
|
||||
);
|
||||
@@ -359,6 +361,9 @@ connectorsRouter.post('/:id/test', async (req, res) => {
|
||||
|
||||
const request =
|
||||
isScriptError && err.request ? err.request : { method: 'GET', path, url: verifyUrl };
|
||||
// Hlavicky rikaji, kdo odpoved vydal. U 403 bez tela je to vsechno,
|
||||
// co zbyde: `Server: Kestrel` je aplikace, `Via: 1.1 Caddy` proxy.
|
||||
const responseHeaders = isScriptError ? (err.responseHeaders ?? null) : null;
|
||||
const check: ConnectorCheck = {
|
||||
at: new Date().toISOString(),
|
||||
ok: false,
|
||||
@@ -367,6 +372,7 @@ connectorsRouter.post('/:id/test', async (req, res) => {
|
||||
message,
|
||||
detail: detail ?? null,
|
||||
request,
|
||||
responseHeaders,
|
||||
};
|
||||
|
||||
await setConnectorStatus(connector.id, 'error', message, check, [tenantId]);
|
||||
@@ -380,6 +386,7 @@ connectorsRouter.post('/:id/test', async (req, res) => {
|
||||
...(status !== undefined ? { status } : {}),
|
||||
request,
|
||||
baseUrl: target.baseUrl,
|
||||
...(responseHeaders ? { responseHeaders } : {}),
|
||||
...(detail ? { detail } : {}),
|
||||
});
|
||||
} finally {
|
||||
|
||||
Reference in New Issue
Block a user