2023-12-10 20:44:52 +01:00
|
|
|
{
|
2023-12-16 15:13:01 +01:00
|
|
|
"production": {
|
2025-10-08 11:20:09 +02:00
|
|
|
"loglevel": "{{cfg_hedgedoc.log_level}}",
|
|
|
|
|
{% if cfg_hedgedoc.database.kind == 'sqlite' %}
|
2023-12-10 20:44:52 +01:00
|
|
|
"db": {
|
|
|
|
|
"dialect": "sqlite",
|
2025-10-08 11:20:09 +02:00
|
|
|
"storage": "{{cfg_hedgedoc.database.data.path}}"
|
2023-12-10 20:44:52 +01:00
|
|
|
},
|
2023-12-18 00:18:34 +01:00
|
|
|
{% endif %}
|
2025-10-08 11:20:09 +02:00
|
|
|
{% if cfg_hedgedoc.database.kind == 'postgresql' %}
|
2023-12-18 00:18:34 +01:00
|
|
|
"db": {
|
|
|
|
|
"dialect": "postgres",
|
2025-10-08 11:20:09 +02:00
|
|
|
"host": "{{cfg_hedgedoc.database.data.host}}",
|
|
|
|
|
"port": {{cfg_hedgedoc.database.data.port | to_json}},
|
|
|
|
|
"username": "{{cfg_hedgedoc.database.data.username}}",
|
|
|
|
|
"password": "{{cfg_hedgedoc.database.data.password}}",
|
|
|
|
|
"database": "{{cfg_hedgedoc.database.data.schema}}"
|
2023-12-18 00:18:34 +01:00
|
|
|
},
|
|
|
|
|
{% endif %}
|
2025-10-08 11:20:09 +02:00
|
|
|
"sessionSecret": "{{cfg_hedgedoc.session_secret}}",
|
2023-12-16 15:13:01 +01:00
|
|
|
"host": "localhost",
|
|
|
|
|
"allowOrigin": [
|
|
|
|
|
"localhost"
|
|
|
|
|
],
|
2025-10-08 11:20:09 +02:00
|
|
|
"domain": "{{cfg_hedgedoc.domain}}",
|
2023-12-10 20:44:52 +01:00
|
|
|
"urlAddPort": false,
|
2023-12-16 15:13:01 +01:00
|
|
|
"protocolUseSSL": true,
|
2025-10-08 11:20:09 +02:00
|
|
|
{% if cfg_hedgedoc.authentication.kind == 'internal' %}
|
2024-03-20 00:07:58 +01:00
|
|
|
"email": true,
|
|
|
|
|
"allowEmailRegister": true,
|
|
|
|
|
{% endif %}
|
2025-10-08 11:20:09 +02:00
|
|
|
{% if cfg_hedgedoc.authentication.kind == 'authelia' %}
|
2023-12-10 20:44:52 +01:00
|
|
|
"oauth2": {
|
2025-10-08 11:20:09 +02:00
|
|
|
"providerName": "{{cfg_hedgedoc.authentication.data.provider_name}}",
|
|
|
|
|
"clientID": "{{cfg_hedgedoc.authentication.data.client_id}}",
|
|
|
|
|
"clientSecret": "{{cfg_hedgedoc.authentication.data.client_secret}}",
|
2023-12-10 20:44:52 +01:00
|
|
|
"scope": "openid email profile",
|
|
|
|
|
"userProfileUsernameAttr": "sub",
|
|
|
|
|
"userProfileDisplayNameAttr": "name",
|
|
|
|
|
"userProfileEmailAttr": "email",
|
2025-10-08 11:20:09 +02:00
|
|
|
"userProfileURL": "{{cfg_hedgedoc.authentication.data.url_base}}/api/oidc/userinfo",
|
|
|
|
|
"tokenURL": "{{cfg_hedgedoc.authentication.data.url_base}}/api/oidc/token",
|
|
|
|
|
"authorizationURL": "{{cfg_hedgedoc.authentication.data.url_base}}/api/oidc/authorization"
|
2023-12-16 15:13:01 +01:00
|
|
|
},
|
|
|
|
|
"email": false,
|
|
|
|
|
"allowEmailRegister": false,
|
|
|
|
|
{% endif %}
|
2025-10-08 11:20:09 +02:00
|
|
|
"allowAnonymous": {{cfg_hedgedoc.guest_allow_create | to_json}},
|
|
|
|
|
"allowAnonymousEdits": {{cfg_hedgedoc.guest_allow_change | to_json}},
|
|
|
|
|
{% if cfg_hedgedoc.free_names_mode == 'never' %}
|
2023-12-18 00:18:34 +01:00
|
|
|
"allowFreeURL": false,
|
|
|
|
|
"requireFreeURLAuthentication": false,
|
|
|
|
|
{% endif %}
|
2025-10-08 11:20:09 +02:00
|
|
|
{% if cfg_hedgedoc.free_names_mode == 'authed' %}
|
2023-12-16 15:13:01 +01:00
|
|
|
"allowFreeURL": true,
|
|
|
|
|
"requireFreeURLAuthentication": true,
|
2023-12-18 00:18:34 +01:00
|
|
|
{% endif %}
|
2025-10-08 11:20:09 +02:00
|
|
|
{% if cfg_hedgedoc.free_names_mode == 'always' %}
|
2023-12-18 00:18:34 +01:00
|
|
|
"allowFreeURL": true,
|
|
|
|
|
"requireFreeURLAuthentication": false,
|
|
|
|
|
{% endif %}
|
2023-12-16 15:13:01 +01:00
|
|
|
"defaultPermission": "editable"
|
2023-12-10 20:44:52 +01:00
|
|
|
}
|
|
|
|
|
}
|