From 0d501e235cf7333ea431247eb053e27372b442d5 Mon Sep 17 00:00:00 2001 From: Jeffrey Phillips Freeman <the@jeffreyfreeman.me> Date: Fri, 13 Oct 2023 15:22:50 -0400 Subject: [PATCH] Moved the rewrites higher to increase priority --- vercel.json | 52 ++++++++++++++++++++++++++-------------------------- 1 file changed, 26 insertions(+), 26 deletions(-) diff --git a/vercel.json b/vercel.json index 0148147da..23327d3ba 100644 --- a/vercel.json +++ b/vercel.json @@ -20,6 +20,32 @@ } ], "rewrites": [ + { + "source": "/([^/]*)/(.*)/", + "has": [ + { + "type": "header", + "key": "Accept", + "value": "application/activity+json" + } + ], + "destination": "/$1/$2/status.ajson" + }, + { + "source": "/([^/]*)/(.*)/", + "missing": [ + { + "type": "header", + "key": "Accept", + "value": "application/activity+json" + } + ], + "destination": "/$1/$2/status.html" + }, + { + "source": "/([^/]*)/(.*)/activity", + "destination": "/$1/$2/activity.ajson" + }, { "source": "/(.+)/$", "destination": "/$1/index.html" @@ -59,32 +85,6 @@ { "source": "/send-note", "destination": "/api/activitypub/sendNote.js" - }, - { - "source": "/news/:pathPage/", - "has": [ - { - "type": "header", - "key": "Accept", - "value": "application/activity+json" - } - ], - "destination": "/news/:pathPage/status.ajson" - }, - { - "source": "/news/:pathPage/", - "missing": [ - { - "type": "header", - "key": "Accept", - "value": "application/activity+json" - } - ], - "destination": "/news/:pathPage/status.html" - }, - { - "source": "/([^/]*)/(.*)/activity", - "destination": "/$1/$2/activity.ajson" } ], "functions": { -- GitLab