braid-http 1.3.37 → 1.3.38
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/braid-http-server.js +5 -1
- package/package.json +1 -1
package/braid-http-server.js
CHANGED
|
@@ -343,7 +343,7 @@ function braidify (req, res, next) {
|
|
|
343
343
|
].map(x => x.toLowerCase()))
|
|
344
344
|
|
|
345
345
|
// copy any CORS headers from the user
|
|
346
|
-
var cors_headers = Object.entries(
|
|
346
|
+
var cors_headers = Object.entries(res2.getHeaders()).
|
|
347
347
|
filter(x => braidify.cors_headers.has(x.key))
|
|
348
348
|
|
|
349
349
|
if (og_stream) {
|
|
@@ -428,6 +428,10 @@ function braidify (req, res, next) {
|
|
|
428
428
|
// just touching these seems to cause issues
|
|
429
429
|
key === '_events' || key === 'emit'
|
|
430
430
|
|
|
431
|
+
// empirically, on an http1 server,
|
|
432
|
+
// this causes res2 to close prematurely
|
|
433
|
+
|| key === 'destroyed'
|
|
434
|
+
|
|
431
435
|
// adding these lines gets rid of some deprecation warnings.. keep?
|
|
432
436
|
|| key === '_headers'
|
|
433
437
|
|| key === '_headerNames') continue
|