jquery - How to secure knockout template? -


I am using the next code to load the template dynamical:

  $ ("Templates.html")}}   

Can the template content be protected from public load in any way? I am using ASP.NET MVC etc.

Instead of creating a physical file, create an action that templates in one of your views. You can use AuthorizeAttribute or you can use any other medium to secure your operation.

Action replacing template.html with the url pointing to the url.

Comments

Popular posts from this blog

python - how we can use ajax() in views.py in django? -

matlab - Using loops to get multiple values into a cell -

python - Sequence Pattern recognition with Pybrain -