-
-
Notifications
You must be signed in to change notification settings - Fork 20
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
mrjones-plip
committed
Jul 31, 2020
1 parent
b58283b
commit c769ca5
Showing
4 changed files
with
5 additions
and
5 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -37,7 +37,7 @@ If the instance is too large to replicate locally (or you are too impatient), yo | |
1. Open Firefox and navigate to `about:config`. Set `security.csp.enable` to `false` to disable Content Security Policies. | ||
1. Navigate to the instance and login as the user with the data you want. _(If you want more data, like an entire district, you could consider logging in as a new user with a contact document at your desired place in the contact hierarchy. But that is an exercise for the reader)_ | ||
1. Wait for the data to replicate. You know this is done once the app lets you interact with it. _(If you want to get the user's data before purging, consider disabling purging. Another exercise for the reader)_ | ||
1. Make sure your local CouchDB has CORS enabled: http://docs.couchdb.org/en/2.1.1/config/http.html?highlight=CORs. Consider using [add-cors-to-couchdb](https://github.com/pouchdb/add-cors-to-couchdb#what-it-does) or its recommended settings. | ||
1. Make sure your local CouchDB has CORS enabled: http://docs.couchdb.org/en/2.1.1/config/http.html?highlight=CORs. Consider using [add-cors-to-couchdb](https://github.com/pouchdb/add-cors-to-couchdb#user-content-what-it-does) or its recommended settings. | ||
1. Allow your CouchDB to be accessible via `https`. One way is to run `ngrok http 5984` to make your CouchDB accessible via a url like `https://abcd1234.ngrok.io`. | ||
1. Open the console in Firefox and run `await PouchDB.replicate('medic-user-XXX', 'https://your:[email protected]/YYY');`. Here `XXX` is the name you logged in as, and `YYY` is the name of a database in which to store the data. | ||
* **Note**: If you get 401s make sure that: your CouchDB credentials are right; and you don't have a local session in the same browser already (session cookies can take precedence over basic auth); and if you're running CouchDB in Docker you have exposed both `5984` and `5986` to localhost. | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters