Max-Kolodezniy/lambda-mvc

Build response doesn't handle a correct "Content-Type" header

Closed this issue · 1 comments

    const _buildResponse = (status, headers, content) => {
        headers = headers || {};

        if (!('ContentType' in headers)) {
            headers['Content-Type'] = 'application/json';
        }

A wrong property name is used in condition to determine if there's a Content-Type in the headers parameter

Please take a look: #2