refactor: update dependencies and remove unused code
- Added new dependencies: `adler2`, `crc32fast`, `flate2`, `miniz_oxide`, and `libredox`. - Updated existing dependencies: `tokio-rustls` to version 0.26.4 and `filetime` to version 0.2.27. - Removed the `backup.rs` file as it is no longer needed. - Introduced tests for configuration and credential management. - Enhanced the `identity` module to generate W3C compliant DID documents. Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
This commit is contained in:
co-authored by
Claude Opus 4.6
parent
fd2a837bea
commit
f07ce10b1a
@@ -5,11 +5,25 @@ import { ref } from 'vue'
|
||||
* Verified by checking response headers from each app container.
|
||||
* These always open in a new tab. Other apps load in the iframe overlay.
|
||||
*/
|
||||
/** Hostnames of external sites that block iframes via X-Frame-Options or CSP.
|
||||
* Sites listed here that also appear in EXTERNAL_PROXY will be proxied (not blocked).
|
||||
*/
|
||||
const IFRAME_BLOCKED_HOSTS: string[] = []
|
||||
|
||||
/** External sites proxied through nginx to strip X-Frame-Options for iframe embedding */
|
||||
const EXTERNAL_PROXY: Record<string, string> = {
|
||||
'botfights.net': '/ext/botfights/',
|
||||
'484.kitchen': '/ext/484-kitchen/',
|
||||
'present.l484.com': '/ext/arch-presentation/',
|
||||
}
|
||||
|
||||
function mustOpenInNewTab(url: string): boolean {
|
||||
try {
|
||||
const u = new URL(url)
|
||||
// External sites — third-party cookie/iframe restrictions
|
||||
if (u.hostname.includes('indeehub')) return true
|
||||
// External sites that block iframes
|
||||
if (IFRAME_BLOCKED_HOSTS.some(h => u.hostname === h || u.hostname.endsWith(`.${h}`))) {
|
||||
return true
|
||||
}
|
||||
// Local apps with X-Frame-Options or CSP frame-ancestors blocking iframes
|
||||
if (
|
||||
u.port === '23000' || // BTCPay — X-Frame-Options: DENY
|
||||
@@ -67,6 +81,13 @@ function toEmbeddableUrl(url: string): string {
|
||||
try {
|
||||
const u = new URL(url)
|
||||
const origin = window.location.origin
|
||||
|
||||
// External sites proxied through nginx to strip X-Frame-Options
|
||||
const extProxy = EXTERNAL_PROXY[u.hostname]
|
||||
if (extProxy) {
|
||||
return `${origin}${extProxy}`
|
||||
}
|
||||
|
||||
const proxyPath = PORT_TO_PROXY[u.port]
|
||||
const sameHost = u.hostname === window.location.hostname
|
||||
const needsProxy = window.location.protocol === 'https:' && u.protocol === 'http:'
|
||||
|
||||
Reference in New Issue
Block a user