How to disable directory listing in Next js #14637
Replies: 3 comments 1 reply
-
You should add an empty For example, let's say i have a domain
For a production site, its better to turn of directory listing. Imagine you have important files in a directory and its open to everyone! |
Beta Was this translation helpful? Give feedback.
-
Hi, sorry to bump this older thread, but we have the same issue. Adding index-files doesn't seem to help much, because they are fingerprinted, so the built folder inside |
Beta Was this translation helpful? Give feedback.
-
Did anyone find a solution for this? |
Beta Was this translation helpful? Give feedback.
-
I have deployed website built in
Next.js
and apparently when you deploy a next js app you can find the directory of all the static files and resources which i don't feel very good about.the directory is generated in this way:
mydomain.com/_next/static
in my casehttps://www.ovanya.com/_next/static/
the next js docs say:
but i really don't understand what directory should i add the index.html file to? so where should i exatcly put the index.html at?
and another question: is it bad if i leave this just like that? does it have any risks or stuff like that?
Beta Was this translation helpful? Give feedback.
All reactions