Open ghost opened 2 years ago
FastBootAppServer duplicates response headers which were set by middleware registered in beforeMiddleware hook.
I've found that it happens during fastboot-express-middleware execution, here: https://github.com/ember-fastboot/ember-cli-fastboot/blob/master/packages/fastboot-express-middleware/src/index.js lines: 44-46
From my perspective, the problem is that code doesn't check already existing response headers before adding new headers from result.headers.
result.headers
Here, you can find a prepared by me demo of the issue: https://github.com/yevhenii-pinkal/fastboot-duplicates-headers-issue/tree/master
FastBootAppServer duplicates response headers which were set by middleware registered in beforeMiddleware hook.
I've found that it happens during fastboot-express-middleware execution, here: https://github.com/ember-fastboot/ember-cli-fastboot/blob/master/packages/fastboot-express-middleware/src/index.js lines: 44-46
From my perspective, the problem is that code doesn't check already existing response headers before adding new headers from
result.headers
.Here, you can find a prepared by me demo of the issue: https://github.com/yevhenii-pinkal/fastboot-duplicates-headers-issue/tree/master