Files
sorsfonalak/services/frontend/next.config.ts
T
fecoandClaude Opus 5.5 2c63384606
CI / build (push) Skipped
CI / deploy (push) Skipped
CI / test (push) Successful in 4m27s
Admin tools for Claude: an MCP server, connected with an admin's approval
- services/mcp: the MCP server at /mcp (Streamable HTTP, stateless): the
  admin's reading tools, the daily tasks and the forum's moderation; every
  tool calls the site's API with the caller's token, and members' e-mail
  addresses and names are masked in the answers.
- Backend: OAuth 2.1 for MCP clients (registration with Claude's or a local
  return address only, PKCE, rotating refresh tokens, revocation); the admin
  guards accept the token for reading and the writes in MCP_WRITES only.
- Forum: an admin's token reaches the moderator endpoints only.
- Frontend: the approval page (/oauth/engedely), Admin → Claude to revoke a
  connection, the authorization server's metadata at its standard address.
- Deploy: the mcp service in compose, Caddy, CI; the worker removes old
  codes, tokens and clients. docs/mcp.md.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_012vLHzh5qUhFtmJhzkcTbXL
2026-11-27 17:09:14 +00:00

33 lines
1.4 KiB
TypeScript

import type { NextConfig } from "next";
const config: NextConfig = {
// Small self-contained server for the container image.
output: "standalone",
poweredByHeader: false,
// The image's version (the commit, APP_VERSION from the CI build): a page
// loaded from an older version reloads itself on its next navigation, and
// VersionWatcher offers a reload when a new one is out. None in development.
deploymentId: process.env.APP_VERSION || undefined,
// The fonts of the share preview images are read from disk at run time.
outputFileTracingIncludes: {
"/s/[slug]/kep/[file]": ["./src/assets/og/*.ttf"],
"/kep/fooldal.png": ["./src/assets/og/*.ttf"],
"/hires-emberek/[slug]/kep/[file]": ["./src/assets/og/*.ttf"],
},
// OAuth for the MCP server's clients (docs/mcp.md): the authorization
// server's metadata, from the backend, at its standard address.
async rewrites() {
return [{ source: "/.well-known/oauth-authorization-server", destination: "/api/v1/oauth/metadata" }];
},
images: {
// Only the famous people's photos (served by the backend through the
// /api/v1 proxy, one stored version each) go through the optimizer.
localPatterns: [{ pathname: "/api/v1/public/photos/**", search: "" }],
formats: ["image/webp"],
// The photo's address changes with every upload: the sized versions may be kept long.
minimumCacheTTL: 2678400,
},
};
export default config;