Note that there are some explanatory texts on larger screens.

plurals
  1. PO
    primarykey
    data
    text
    <p>I'm pretty sure it's not possible to selectively load scripts within a Meteor app at this time. The one exception is that you can protect any sensitive code by putting it in the <code>/server</code> directory (which does not get sent to the client) and lock down data as @Patrick Coffey suggested (also making use of Meteor <code>method</code>s). If you do this, you don't have to reveal your full model schema, authentication rules, or sensitive algorithms to the client, and you can tightly control which records and even fields of records are visible to the client. It works well, and you can choose the level of convenience/performance vs. security you want by how open-ended you make your API. </p> <p>If your templates and helpers are sensitive, you'll have to wait until server-side rendering is introduced (<a href="https://trello.com/c/Lz07fBAm/7-server-side-rendering" rel="nofollow">it's on the roadmap</a>) or cook up your own solution without Meteor's help, but I think there may be a reason to look a little deeper at the question. The premise of your concern appears to be that authenticated users will somehow be more trustworthy than non-authenticated users, but in most situations (even inside a company), there is a likelihood of there being users that are also untrustworthy – or users whose accounts get hacked - and these people will always have access to anything you send to the browser. So from that perspective, it makes sense to be sure you don't put important secrets in templates or client-side code regardless. For most apps, though, templates and helpers will not be sensitive, and if you set up your server well, hacked templates won't be able to access anything that normal templates can't.</p>
    singulars
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    plurals
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
 

Querying!

 
Guidance

SQuiL has stopped working due to an internal error.

If you are curious you may find further information in the browser console, which is accessible through the devtools (F12).

Reload