bundles/ntfy: add option to disable unauthorized writes
This commit is contained in:
parent
f17117d640
commit
c6cf997102
3 changed files with 8 additions and 0 deletions
|
@ -85,7 +85,11 @@ cache-startup-queries: |
|
||||||
# ntfy user and group by running: chown ntfy.ntfy <filename>.
|
# ntfy user and group by running: chown ntfy.ntfy <filename>.
|
||||||
#
|
#
|
||||||
auth-file: "/var/lib/ntfy/user.db"
|
auth-file: "/var/lib/ntfy/user.db"
|
||||||
|
% if node.metadata.get('ntfy/allow_unauthorized_write'):
|
||||||
auth-default-access: "write-only"
|
auth-default-access: "write-only"
|
||||||
|
% else:
|
||||||
|
auth-default-access: "deny-all"
|
||||||
|
% endif
|
||||||
|
|
||||||
# If set, the X-Forwarded-For header is used to determine the visitor IP address
|
# If set, the X-Forwarded-For header is used to determine the visitor IP address
|
||||||
# instead of the remote address of the connection.
|
# instead of the remote address of the connection.
|
||||||
|
|
|
@ -19,6 +19,9 @@ defaults = {
|
||||||
"/var/opt/ntfy",
|
"/var/opt/ntfy",
|
||||||
},
|
},
|
||||||
},
|
},
|
||||||
|
'ntfy': {
|
||||||
|
'allow_unauthorized_write': False,
|
||||||
|
},
|
||||||
'zfs': {
|
'zfs': {
|
||||||
'datasets': {
|
'datasets': {
|
||||||
'tank/ntfy': {},
|
'tank/ntfy': {},
|
||||||
|
|
|
@ -225,6 +225,7 @@ nodes['htz-cloud.miniserver'] = {
|
||||||
},
|
},
|
||||||
'ntfy': {
|
'ntfy': {
|
||||||
'domain': 'ntfy.sophies-kitchen.eu',
|
'domain': 'ntfy.sophies-kitchen.eu',
|
||||||
|
'allow_unauthorized_write': True,
|
||||||
},
|
},
|
||||||
'postgresql': {
|
'postgresql': {
|
||||||
'version': '11',
|
'version': '11',
|
||||||
|
|
Loading…
Reference in a new issue