fasten-onprem/docker/couchdb/fasten.ini

55 lines
2.1 KiB
INI

; CouchDB Configuration Settings
; Custom settings should be made in this file. They will override settings
; in default.ini, but unlike changes made to default.ini, this file won't be
; overwritten on server upgrade.
[couch_peruser]
; fasten requires that each user have a private database. These databases are writable only by the corresponding user.
; Databases are in the following form: userdb-{hex encoded username}
enable = true
[chttpd_auth]
; require_valid_user must be set to false because Fasten will check session endpoint to determine if user is authenticated.
; if this option is not disabled, user is prompted with basic auth.
require_valid_user = false
[httpd]
; enable CORS support, required because the database is hosted on a different node.
enable_cors = true
; ------------------------------------------ DOCKER MODIFICATIONS
; ------------------------------------------ DOCKER MODIFICATIONS
; ------------------------------------------ DOCKER MODIFICATIONS
; ------------------------------------------ DOCKER MODIFICATIONS
; always use single node in docker
[couchdb]
;max_document_size = 4294967296 ; bytes
;os_process_timeout = 5000
single_node = true
; when running in docker, allow cors for all domains
; TODO, we should find a more secure way to do this
[cors]
origins = *
headers = accept, authorization, content-type, origin, referer
credentials = true
methods = GET, PUT, POST, HEAD, DELETE
max_age = 3600
# make sure the databse is listening to all traffic, not just from localhost within the container.
[chttpd]
;port = 5984
;bind_address = 127.0.0.1
bind_address = 0.0.0.0
enable_cors = true
x_forwarded_host = X-Forwarded-Host
; require_valid_user must be set to false because Fasten will check session endpoint to determine if user is authenticated.
; if this option is not disabled, user is prompted with basic auth.
require_valid_user = false
; fasten uses JWT tokens to authenticate against the database. we override the authentication_handlers to add jwt_authentication_handler
authentication_handlers = {chttpd_auth, jwt_authentication_handler}, {chttpd_auth, cookie_authentication_handler}, {chttpd_auth, default_authentication_handler}