Prevent the creation of routes from components and public folders in the pages folder. And deny access to see files in public folders. #14485
Unanswered
GrigoriyShapovalov
asked this question in
Help
Replies: 2 comments
-
Hi, @timneutkens ! Can you help me, please?? :) |
Beta Was this translation helpful? Give feedback.
0 replies
-
This is what misleads me. Does this add extra code to the build? Because I customized server and useFileSystemPublicRoutes: false. |
Beta Was this translation helpful? Give feedback.
0 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
-
I have NextJs application with a custom server where I have customized a route. Where I show the template depending on the hostname and pathname.
My server.js

I am creating a template in the pages folder. And I want to create the components, public folder in it. Like this.
But NextJs build everything in the pages folder as routes.
My next.config.js
with useFileSystemPublicRoutes: false
I need to prevent the creation of routes from components and public folders in the pages folder. I also need to deny access to see files in public folders.
Beta Was this translation helpful? Give feedback.
All reactions