import { randomBytes } from 'node:crypto'; import { createSidecarProxy } from '@@/sidecar/create-proxy'; import { mountPrefix } from '@@/plugins/manifest'; import { manifest } from '../manifest'; // Two doors, because an iframe cannot carry a bearer token. // // ── The ordinary door ── // // `/_config`, `/_health` and `/_api/*` are normal API calls from the panel. They go through the // platform's gate like any plugin's, and `createSidecarProxy` forwards them. // // ── The iframe door ── // // Gitea already has a web interface, and this plugin renders it rather than reimplementing it. That // means an `