拒绝访问js资产。值得推荐?怎么做?

问题描述 投票:0回答:1

我需要拒绝公众用户查看我们在网站上使用的js框架。 我有php和js的Apache 2.x版本。 首先我的问题是,它值得推荐吗?我的意思是,不会拒绝访问该目录也会阻止Apache解析框架并使用它吗? 第二,我该如何实现呢?我试过了 RedirectMatch 404 /var/www/html/js/.* example.com遵循本指南:https://alvinalexander.com/web/apache-redirectmatch-examples-wildcard-301 此外,我尝试使用/ js目录中的.htaccess文件,只有deny from all,甚至<Directory "/var/www/html/js"> </Directory>Options -Indexesdeny from all,但没有运气。这样做的正确方法是什么?

编辑


This is part of a pentest result that has been done to my server and the auditors are saying the public access to /js directory and frameworks within it is a security problem so, I'm trying to look for a way to deny access or well, find a way to justify the access to this directory
javascript apache .htaccess httpd.conf
1个回答
0
投票

答案是......它无法完成,因为它是javascript如何工作的一部分,它必须是可见的,以便网站工作

© www.soinside.com 2019 - 2024. All rights reserved.