VitalSource assignments in the LMS are different than other assignment types because the document is being displayed in a reader maintained by a third-party (VitalSource) rather than Via. This third-party reader always tries to load the production version of Hypothesis, whereas when Via is used to deliver a document, your local instance of Via will use your local Hypothesis client. A workaround for this issue to enable local testing is to redirect the request for the client's boot script to point to your local client, and modify the local client to ignore parts of the Hypothesis configuration in the page where the client's boot script is loaded.
The approach documented here can also be used in other situations where you want to subtitute the production Hypothesis client with the local one, in a page or web application where we can't modify the script tag that loads the client.
- Configure your browser to redirect requests for the client's boot script at https://hypothes.is/embed.js to http://localhost:5000