sync/src/web
Calvin Montgomery 6043647cb7 Skip full user auth for most page renders
Previously, the user's session cookie was being checked against the
database for all non-static requests.  However, this is not really
needed and wastes resources (and is slow).

For most page views (e.g. index, channel page), just parsing the value
of the cookie is sufficient:

  * The cookies are already HMAC signed, so tampering with them ought to
    be for all reasonable purposes, impossible.
  * Assuming the worst case, all a nefarious user could manage to do is
    change the text of the "Welcome, {user}" and cause a (non-functional)
    ACP link to appear clientside, both of which are already possible by
    using the Inspect Element tool.

For authenticated pages (currently, the ACP, and anything under
/account/), the full database check is still performed (for now).
2017-08-01 21:40:26 -07:00
..
middleware Skip full user auth for most page renders 2017-08-01 21:40:26 -07:00
routes Upgrade to jsli 2.0 2017-07-08 20:11:54 -07:00
account.js Skip full user auth for most page renders 2017-08-01 21:40:26 -07:00
acp.js Skip full user auth for most page renders 2017-08-01 21:40:26 -07:00
auth.js Skip full user auth for most page renders 2017-08-01 21:40:26 -07:00
csrf.js Web refactoring 2015-10-26 22:56:53 -07:00
httpstatus.js Experimental ustream fix 2017-03-02 18:47:47 -08:00
localchannelindex.js Web refactoring 2015-10-26 22:56:53 -07:00
pug.js Skip full user auth for most page renders 2017-08-01 21:40:26 -07:00
webserver.js Skip full user auth for most page renders 2017-08-01 21:40:26 -07:00