I’m new to web developement so I’m sorry in advance because I assume this is a pretty simple question.
I’m currently hosting a website on hostinger – deployed straight from my github repo.
Currently, someone is able to type files directly in the url
e.g. https://mywebsite.com/index.css to see the css in that file being used or https://mywebsite.com/script.js to see the js code in that file
Is this a problem? I assume it is as other websites prevent this from happening by either redirecting at that url or just returning a 403 error.
If it is a problem, how would I go about doing the same?
serbra is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
Check out our Code of Conduct.