Using the plugin behind a reverse proxy #66
derekantrican
started this conversation in
Show and tell
Replies: 0 comments
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
Just want to share something I finally got working after #60 was resolved via #65.
I wanted to set up the Obsidian local rest API behind a reverse proxy (in my case: nginx). I have an
auth_basic
specification so anAuthorization ...
header is already required for interacting with nginx - meaning that the above linked changes were necessary as there isn't really precedent for multipleAuthorization
headers (there's some hacky workarounds, but nginx can't really support them). Thanks @coddingtonbear !So using the new Advanced Settings option, I changed the
Authorization
header toX-API-KEY
and after a bit of trial & error, set up the following location block:Obviously
[TOKEN]
is where I've put my token from the plugin. You could remove this line and require the call to your server to pass both theAuthorization ...
header for nginx AND theX-API-KEY ...
header for the Obsidian plugin.Since the plugin doesn't have a "base url" option to work with reverse proxies, I had to use the
rewrite
rule. This will turn something likehttp://myserver.com/obsidian/search/simple?query=test
intohttp://127.0.0.1:27123/search/simple?query=test
locally (removing the/obsidian
section).Hope this helps someone else!
Beta Was this translation helpful? Give feedback.
All reactions