Skip to content

Commit

Permalink
toml + redirect
Browse files Browse the repository at this point in the history
  • Loading branch information
gxjansen committed Nov 26, 2024
1 parent 07aa6eb commit 209bedb
Show file tree
Hide file tree
Showing 2 changed files with 28 additions and 3 deletions.
22 changes: 22 additions & 0 deletions netlify.toml
Original file line number Diff line number Diff line change
@@ -0,0 +1,22 @@
[build]
command = "npm run build"
publish = "dist"

[[redirects]]
from = "/keystatic"
to = "/.netlify/functions/entry"
status = 200

[[redirects]]
from = "/keystatic/*"
to = "/.netlify/functions/entry"
status = 200

[[redirects]]
from = "/*"
to = "/index.html"
status = 200

[functions]
directory = ".netlify/functions/"
node_bundler = "esbuild"
9 changes: 6 additions & 3 deletions public/_redirects
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,9 @@
/discussions/ https://forum.commercequest.space/discussions/ 301
/profile/* https://forum.commercequest.space/profile/:splat 301

# Keystatic routes
/keystatic/* /keystatic/:splat 200
/admin /keystatic 301
# Keystatic routes - ensure OAuth callback is handled
/keystatic/cloud/oauth/callback /keystatic/cloud/oauth/callback 200
/keystatic/* /keystatic/:splat 200
/admin /keystatic 301

/* /index.html 200

0 comments on commit 209bedb

Please sign in to comment.