mirror of
https://github.com/promplate/pyth-on-line.git
synced 2025-12-03 18:38:18 +00:00
feat: add conditional redirects when accept header contains text/html
Co-Authored-By: Claude <noreply@anthropic.com>
This commit is contained in:
2
netlify.toml
Normal file
2
netlify.toml
Normal file
@@ -0,0 +1,2 @@
|
||||
[build]
|
||||
edge_functions = "src/netlify/edge-functions"
|
||||
@@ -66,6 +66,7 @@
|
||||
},
|
||||
"devDependencies": {
|
||||
"@antfu/eslint-config": "^5.3.0",
|
||||
"@netlify/edge-functions": "^2.17.4",
|
||||
"@types/emscripten": "^1.41.1",
|
||||
"@types/mdast": "^4.0.4",
|
||||
"@types/node": "^24.3.1",
|
||||
|
||||
9
src/netlify/edge-functions/llms-redirect.ts
Normal file
9
src/netlify/edge-functions/llms-redirect.ts
Normal file
@@ -0,0 +1,9 @@
|
||||
import type { Config } from "@netlify/edge-functions";
|
||||
|
||||
export default async () => Response.redirect("/hmr/llms", 302);
|
||||
|
||||
export const config: Config = {
|
||||
path: "/hmr/llms*",
|
||||
excludedPath: "/hmr/llms",
|
||||
header: { accept: "text/html" },
|
||||
};
|
||||
Reference in New Issue
Block a user