#Params has font file.

5 messages · Page 1 of 1 (latest)

stone tendon
#

Params load twice, first is correct number of page then it spits font file.
This is in SSR, [...page].astro, also happening in every route.

{ page: '5' }
{ page: 'CourierPrime-Regular.ttf' }

pine wedgeBOT
#
Quiet in here?

It looks like no-one has responded to your question yet. People might not be available right now or don’t know how to answer your question. Want an answer while you wait? Try asking our experimental bot in #1095492539085230272.

round sage
#

When using SSR src/pages/[...slug].astro files will catch/match all requests so you have to validate the param and only render the page if the param is valid

flint ferry
#

Hi ,
@stone tendon , did you figure out a fix. Am having the same issue .

console.log(Astro.params) 
---

logs

> @example/basics@0.0.1 dev
> astro dev

  🚀  astro  v2.8.1 started in 48ms
  
  ┃ Local    http://localhost:8080/
  ┃ Network  http://192.168.4.31:8080/
  
09:15:02 PM [astro] reload /src/pages/Room/[state]/[city]/[zip]/[id].astro
{
  state: 'Oklahoma',
  city: 'Detroit',
  zip: '829',
  id: '64ab9c7c5f95c56c9e1b12ea'
}
{
  state: 'Oklahoma',
  city: 'Detroit',
  zip: 'images',
  id: 'favicon.png'
}

It seem like it loads the param with the right variable the first time. Then loads it with different variable

round sage
#

Since your using SSR the param will match ANY url/request. After the first page loads it makes a request for the favicon which is why the second object it being printed, to fix this you have to validate that the param is an id that exists or else you 404