Add CouchDB local.ini (LiveSync-tuned: CORS, single_node, big request size)
This commit is contained in:
parent
6162a160d3
commit
e8fc4139c0
1 changed files with 39 additions and 0 deletions
39
obsidian-sync/couchdb/local.ini
Normal file
39
obsidian-sync/couchdb/local.ini
Normal file
|
|
@ -0,0 +1,39 @@
|
||||||
|
# =============================================================================
|
||||||
|
# 10-livesync.ini — CouchDB config overrides for Obsidian Self-hosted LiveSync
|
||||||
|
# Lands in /opt/couchdb/etc/local.d/ so it overrides base defaults.
|
||||||
|
# Reference: vrtmrz/obsidian-livesync "Setup your own server" docs.
|
||||||
|
# =============================================================================
|
||||||
|
|
||||||
|
[couchdb]
|
||||||
|
# Single machine, no clustering. Required for a standalone LiveSync server.
|
||||||
|
single_node = true
|
||||||
|
# Allow large notes/attachments (50 MB). Raise if you paste big PDFs/images.
|
||||||
|
max_document_size = 50000000
|
||||||
|
|
||||||
|
[chttpd]
|
||||||
|
# Listen on all interfaces inside the container (Traefik reaches it via the net).
|
||||||
|
bind_address = 0.0.0.0
|
||||||
|
# LiveSync streams revisions in big batches; default request cap is too small.
|
||||||
|
max_http_request_size = 4294967296
|
||||||
|
# Force every request to carry valid credentials — this is CouchDB's own auth,
|
||||||
|
# i.e. the reason we do NOT also put Traefik basicAuth in front of it.
|
||||||
|
require_valid_user = true
|
||||||
|
|
||||||
|
[chttpd_auth]
|
||||||
|
require_valid_user = true
|
||||||
|
|
||||||
|
[httpd]
|
||||||
|
WWW-Authenticate = Basic realm="couchdb"
|
||||||
|
|
||||||
|
# --- CORS -------------------------------------------------------------------
|
||||||
|
# LiveSync runs inside browsers with DIFFERENT origins:
|
||||||
|
# desktop Obsidian -> app://obsidian.md
|
||||||
|
# mobile Obsidian -> capacitor://localhost
|
||||||
|
# Ignis -> https://notes.manohargupta.com
|
||||||
|
# So we must allow cross-origin credentialed requests from all of them.
|
||||||
|
[cors]
|
||||||
|
origins = *
|
||||||
|
credentials = true
|
||||||
|
headers = accept, authorization, content-type, origin, referer
|
||||||
|
methods = GET, PUT, POST, HEAD, DELETE
|
||||||
|
max_age = 3600
|
||||||
Loading…
Add table
Reference in a new issue