The following error happens if the header is set
to 'Content-Type: application/json':
{"statusCode":400,"message":"One or more errors occurred!",
"errors":{"serializerErrors":["The input does not contain
any JSON tokens. Expected the input to start with a valid
JSON token, when isFinalBlock is true. LineNumber:
0 | BytePositionInLine: 0."]}}
Fix TXT removal
when fetching all zones the memory usage can exceede limits and also
cause timeouts.
with this change the zone will be searched via the longest to shortest
match using the get endpoint.
it is related to this bug report: opnsense/plugins#3525
FreeBSD's sed doesn't have the -z option, so empty certificates are delivered to vault when running the script on FreeBSD.