When you start entering a new string into the URL field of a content type, it defaults to leading with a forwards slash. However, a content editor can remove this and still publish the content (ie “/about” vs “about”). The problem that I have found is that on a NextJS site using SSR the context.resolvedUrl object in getServerSideProps will always return a leading forwards slash. When we query the API with this value, it won’t grab any entries which have had the forwards slash removed by a content editor.
Outside of custom field validation, is there any way around this?
Best answer by bethany.wiles
View original