Commit 101b8055 authored by Robert Knight's avatar Robert Knight

Update default asset root to cdn.hypothes.is

We decided to publish the client's assets to a Hypothesis-specific
domain because publishers (eg. https://internethealthreport.org) may
want to use CSP to restrict where assets are loaded from and they won't
want to whitelist the whole of npm.

This also gives us better control over caching headers used on assets.
parent 17454485
...@@ -16,7 +16,7 @@ var settings = require('../shared/settings')(document); ...@@ -16,7 +16,7 @@ var settings = require('../shared/settings')(document);
// serving the Hypothesis client to tell it where to load the sidebar and assets // serving the Hypothesis client to tell it where to load the sidebar and assets
// from. // from.
var defaultAssetRoot = 'https://unpkg.com/hypothesis@__VERSION__/'; var defaultAssetRoot = 'https://cdn.hypothes.is/hypothesis/__VERSION__/';
boot(document, { boot(document, {
assetRoot: settings.assetRoot || defaultAssetRoot, assetRoot: settings.assetRoot || defaultAssetRoot,
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment