Skip to content

Commit

Permalink
fix: resolve trailing slash (#199)
Browse files Browse the repository at this point in the history
# Description

Explicitly define trailing slash settings for URLs. There seems to be a
redirect happening somehow that will redirect a URL for example:
"docs.zksync.io/build" -> "docs.zksync.io/build/" but then the trailing
slash is removed without a redirect. There may be a clash between
hosting configuration, nuxt configuration, and nuxt seo module
configuration.

We want trailing slashes removed to be the default configuration for
URLs and we do not want any redirects flipping between the two.
  • Loading branch information
itsacoyote committed Aug 21, 2024
1 parent 109e959 commit 674691e
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 0 deletions.
1 change: 1 addition & 0 deletions firebase.json
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
{
"hosting": {
"trailingSlash": false,
"public": ".output/public",
"ignore": ["firebase.json", "**/.*", "**/node_modules/**"],
"headers": [
Expand Down
7 changes: 7 additions & 0 deletions nuxt.config.ts
Original file line number Diff line number Diff line change
Expand Up @@ -24,6 +24,13 @@ export default defineNuxtConfig({
'/zk-stack/concepts': { redirect: '/zk-stack/concepts/transaction-lifecycle' },
'/zk-stack/running-a-zk-chain': { redirect: '/zk-stack/running-a-zk-chain/locally' },
},
experimental: {
defaults: {
nuxtLink: {
trailingSlash: 'remove',
},
},
},
pwa: {
selfDestroying: true,
strategies: 'generateSW',
Expand Down

0 comments on commit 674691e

Please sign in to comment.