Using the plugin behind a reverse proxy #66
derekantrican
started this conversation in
Show and tell
Replies: 1 comment
-
|
For anyone trying to get this working on Cloudflare Reverse Tunnel, turn off TLS Verify and create a Port Proxy on your Windows machine |
Beta Was this translation helpful? Give feedback.
0 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
-
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_basicspecification 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 multipleAuthorizationheaders (there's some hacky workarounds, but nginx can't really support them). Thanks @coddingtonbear !So using the new Advanced Settings option, I changed the
Authorizationheader toX-API-KEYand 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
rewriterule. This will turn something likehttp://myserver.com/obsidian/search/simple?query=testintohttp://127.0.0.1:27123/search/simple?query=testlocally (removing the/obsidiansection).Hope this helps someone else!
Beta Was this translation helpful? Give feedback.
All reactions