web/website/node/retired-tickets.mjs
unimatrixgit 77cdf19faa Checkpoint Alpha 1.0.0.3 graphical menus and moderation evidence
Preserve the current Alpha source and artwork snapshot. See handoff/alpha-1.0.0.3 for actual deployed hashes, checks, staged follow-ups and the production pause. This checkpoint does not claim every source feature is deployed.
2026-11-02 00:05:34 +01:00

6 lines
690 B
JavaScript

// osTicket is the sole ticket store. Retired APIs must never regain broad legacy staff access.
export function retiredTicketResponse(request){
const path=new URL(request.url).pathname;
if(!['/api/tickets','/api/cp/tickets','/api/cp/support-profile'].some(base=>path===base||(base!=='/api/cp/support-profile'&&path.startsWith(base+'/'))))return null;
return new Response(request.method==='HEAD'?null:JSON.stringify({message:'Support tickets are handled in the Support center.',supportUrl:'https://support.dunerealms.com/'}),{status:410,headers:{'Content-Type':'application/json; charset=utf-8','Cache-Control':'no-store','Link':'<https://support.dunerealms.com/>; rel="alternate"'}});
}