allow null/None JSON data

This change permits to proxy pdns zone notify api requests (which are expected to be with empty body)
This commit is contained in:
WhatshallIbreaktoday 2022-10-12 08:10:35 +02:00
parent f8048bf6aa
commit d25a22272e

View File

@ -14,9 +14,9 @@ def forward_request():
msg_str = "Sending request to powerdns API {0}"
if request.method != 'GET' and request.method != 'DELETE':
msg = msg_str.format(request.get_json(force=True))
msg = msg_str.format(request.get_json(force=True, silent=True))
current_app.logger.debug(msg)
data = request.get_json(force=True)
data = request.get_json(force=True, silent=True)
verify = False