Skip to main content
Level 4
Oct 16, 2015 2:28 AM UTC
Solved

Make non-minified js not accessible

Hello!

Is it somehow possible to make them not accessible in production environments? What's the best solution?

- Delete the non-minified version of the js scripts?

- Add a rule at dispatcher level that blocks js files requests not containing "min" in the URL?

 

Thank you!

This post is no longer active and is closed to new replies. Need help? Start a new post to ask your question.
Kunal_Gaba_
Kunal_Gaba_Accepted solution
New Member
Oct 16, 2015 2:28 AM UTC

You should not delete the non-minified JS versions as they will be needed by the client library manager to build the minified versions. So, the recommended option is to use dispatcher and block those unnecessary requests. 

3 replies

Lokesh_Shivalingaiah
Level 10
Oct 16, 2015 2:28 AM UTC

Actually, you can push only minified version to prod

Translate
boser87Author
Level 4
Oct 16, 2015 2:28 AM UTC

Thank you very much for your response! I appreciate it. I thought that the non-minified version was actually needed by the minification process. It would be grat to refine the process like this:

- every time there's a new non-minified version, start minification process

- when finished delete the non-minified version

 

But, again, maybe adding the dispatcher rule is the best solution!

Translate
Kunal_Gaba_
Kunal_Gaba_Accepted solution
New Member
Oct 16, 2015 2:28 AM UTC

You should not delete the non-minified JS versions as they will be needed by the client library manager to build the minified versions. So, the recommended option is to use dispatcher and block those unnecessary requests. 

Translate