A
A
Alexander Sharomet2016-12-23 16:36:26
JavaScript
Alexander Sharomet, 2016-12-23 16:36:26

How to prevent js files from being displayed if you enter the path to the file in the url?

Hello.
Tell me how you can prevent showing data from js, ts files
Example:
Angular2 project on typescript if a person enters the path to the app/main.ts, main.js file in the url, then these files are displayed, how to prevent this?

Answer the question

In order to leave comments, you need to log in

2 answer(s)
A
Alexey Yarkov, 2016-12-23
@sharomet

Listen, what's your secret code? Don't imagine the impossible. Use an obfuscator as a last resort.

S
Seva, 2016-12-23
@Zewkin

No, how do you imagine it? How do you think the browser will execute them if it does not have access to them?

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question