fix(oembed.php): dry up response objects

This commit is contained in:
Cory Dransfeldt 2025-05-10 19:14:29 -07:00
parent 52257f50a1
commit 84a1c0d4cc
No known key found for this signature in database
4 changed files with 40 additions and 39 deletions

View file

@ -56,7 +56,8 @@ RewriteRule ^og/([a-z0-9\-]+)/([a-f0-9\-]+)\.([a-z0-9]+)$ /api/og-image.php?id=$
RewriteRule ^og/([a-z0-9\-]+)/([\d\.]+)/([a-f0-9\-]+)\.([a-z0-9]+)$ /api/og-image.php?id=$3&class=$1&v=$2&extension=$4 [L]
## oembed
RewriteRule ^oembed/(.*)$ /api/oembed.php?url=https://www.coryd.dev/$1 [L,QSA]
RewriteRule ^oembed/?$ /api/oembed.php [L]
RewriteRule ^oembed/(.+)$ /api/oembed.php?url=https://www.coryd.dev/$1 [L,QSA]
{% for redirect in redirects -%}
Redirect {{ redirect.status_code | default: "301" }} {{ redirect.source_url }} {{ redirect.destination_url }}