Skip to content

Commit aab66af

Browse files
feat: just accept any content type as json
1 parent 0f89ad6 commit aab66af

1 file changed

Lines changed: 3 additions & 2 deletions

File tree

src/server.js

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -17,10 +17,11 @@ const adjustEndpoints = require('./controllers/adjustEndpoints');
1717
const providerApp = express();
1818
const healthApp = express();
1919

20-
// Middleware - configure JSON parser to accept external-dns content type
20+
// Middleware - parse all requests as JSON regardless of content-type
21+
// External-DNS uses 'application/external.dns.webhook+json;version=1' but the payload is always JSON
2122
providerApp.use(express.json({
2223
limit: '10mb',
23-
type: ['application/json', 'application/external.dns.webhook+json*']
24+
type: '*/*' // Accept any content-type and parse as JSON
2425
}));
2526
healthApp.use(express.json());
2627

0 commit comments

Comments
 (0)