Changeset 834bcc3 in Klonkt for src/routes/federation.js


Ignore:
Timestamp:
06/23/2026 06:14:27 PM (3 months ago)
Author:
Robin Genis <roboburr@…>
Branches:
main
Children:
d774679
Parents:
bb42dfb
Message:

i18n: translate Dutch code comments to English across src/

Comments in routes/services/views/config/middleware/assets translated to
English for the public repo. A few dev-facing throw/console message strings
were Englished too. No user-facing UI strings or i18n dictionary values changed
(src/services/i18n.js untouched). Logic unchanged.

Co-Authored-By: Claude <noreply@…>

File:
1 edited

Legend:

Unmodified
Added
Removed
  • src/routes/federation.js

    rbb42dfb r834bcc3  
    1 // routes/federation.js — publieke Cirkels-endpoints (v1, publicatie-kant).
     1// routes/federation.js — public Cirkels endpoints (v1, publication side).
    22//
    3 //   GET /.klonkt/actor.json   — ActivityStreams-actor + Ed25519-pubkey
    4 //   GET /.klonkt/outbox.json  — publieke posts als AS Create-objecten,
    5 //                               getekend via de Klonkt-Signature-header
     3//   GET /.klonkt/actor.json   — ActivityStreams actor + Ed25519 public key
     4//   GET /.klonkt/outbox.json  — public posts as AS Create objects,
     5//                               signed via the Klonkt-Signature header
    66//
    7 // Site-agnostisch en zonder auth — alleen lezen. Zie docs/cirkels-v1-spec.md.
     7// Site-agnostic and unauthenticated — read-only. See docs/cirkels-v1-spec.md.
    88
    99import express from 'express';
     
    1818}
    1919
    20 // De proto die de consument zegt te draaien (uit z'n request-header), of 0.
     20// The proto the consumer claims to be running (from their request header), or 0.
    2121function consumerProto(req) {
    2222  return parseInt(req.get('Klonkt-Proto') || '0', 10) || 0;
     
    2424
    2525router.get('/.klonkt/actor.json', (req, res) => {
    26   // Cirkels = solo-naar-solo; hubs publiceren geen federatie-actor.
     26  // Circles = solo-to-solo; hubs do not publish a federation actor.
    2727  if (getTenancy() === 'hub') return res.status(404).type('text/plain').send('Niet beschikbaar in hub-modus');
    28   // De actor serveren we ALTIJD (ook aan oudere consumenten) zodat zij onze proto
    29   // kunnen lezen en een nette "update vereist"-melding kunnen tonen.
     28  // We ALWAYS serve the actor (including to older consumers) so they can read our
     29  // proto and show a clean "update required" message.
    3030  const body = JSON.stringify(buildActor(baseUrl(req)), null, 2);
    3131  res.type('application/activity+json; charset=utf-8');
     
    3838  if (getTenancy() === 'hub') return res.status(404).type('text/plain').send('Niet beschikbaar in hub-modus');
    3939  res.set('Klonkt-Proto', String(KLONKT_PROTO));
    40   // Te-oude consument? Weiger met 426 Upgrade Required (de crypto-binding sluit 'm
    41   // sowieso al uit; dit geeft een expliciet, leesbaar signaal). proto 0 = geen
    42   // header (bv. een browser/curl) → toestaan, die verifieert toch niet.
     40  // Consumer too old? Reject with 426 Upgrade Required (the crypto binding already
     41  // excludes them; this gives an explicit, readable signal). proto 0 = no header
     42  // (e.g. a browser/curl) → allow, they won't verify anyway.
    4343  const cp = consumerProto(req);
    4444  if (cp && cp < MIN_PROTO) {
Note: See TracChangeset for help on using the changeset viewer.