- Accept the private-console transport with an exact Origin/Host match; the http console is not a secure context, so Chrome sends no Sec-Fetch-Site and that requirement made every real write 400. - Reject bracketed non-IPv6 host spellings, including ported forms, instead of normalising them to loopback. - Show the plaintext-warning copy or the disabled state from a tri-state capability field; old APIs keep the legacy message. - Document WEKNORA_ALLOW_PRIVATE_HTTP in .env.example and the operations runbook.
This commit is contained in:
@@ -3,3 +3,10 @@
|
||||
export function secretEntryAllowed(location: { protocol: string; hostname: string }): boolean {
|
||||
return location.protocol === 'https:' || ['localhost', '127.0.0.1', '[::1]', '::1'].includes(location.hostname)
|
||||
}
|
||||
|
||||
// True when a key typed here would cross a network in the clear, even though
|
||||
// the server presently allows it. Drives the warning only, never the gate:
|
||||
// the gate is the server-reported capability.
|
||||
export function plaintextRemoteConsole(location: { protocol: string; hostname: string }): boolean {
|
||||
return !secretEntryAllowed(location)
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user