From ea69092d5d4d44c3ad77349c5ffef25a3360b20a Mon Sep 17 00:00:00 2001 From: Jeremy Lin Date: Wed, 19 Feb 2020 00:54:46 -0800 Subject: [PATCH] Updated Using an alternate base dir (markdown) --- Using-an-alternate-base-dir.md | 10 +++++++++- 1 file changed, 9 insertions(+), 1 deletion(-) diff --git a/Using-an-alternate-base-dir.md b/Using-an-alternate-base-dir.md index 051ce99..b250ba1 100644 --- a/Using-an-alternate-base-dir.md +++ b/Using-an-alternate-base-dir.md @@ -40,4 +40,12 @@ Modify the upstream code and/or bitwarden_rs patches and rebuild the web vault. ### The quick and dirty way 1. Enter a shell in the bitwarden_rs container: `docker exec -it /bin/sh` -2. Patch the web vault: `sed -i "s|window\.location\.origin|window.location.origin+'/secret-dir'|g" /web-vault/app/main*.js` (of course, replace `/secret-dir` with your actual base dir) \ No newline at end of file +2. Patch the web vault: `sed -i "s|window\.location\.origin|window.location.origin+'/secret-dir'|g" /web-vault/app/main*.js` (of course, replace `/secret-dir` with your actual base dir) + +Pros: +* It works just fine for normal purposes. +* This approach could be easily automated on container start. + +Cons: +* It's a brittle solution, although it's probably not too likely `window.location.origin` would be used for anything else. +* It will probably break the [source map](https://www.html5rocks.com/en/tutorials/developertools/sourcemaps/), but this won't matter unless you're doing development or need to troubleshoot with a developer. \ No newline at end of file