Remove a redundant Express-targeted `resp.set` call from the `script` handler
in `middleware-mockserver.js` as was done on the `main` branch.
Closes gh-5413
Ref gh-5397
headers[ "access-control-allow-origin" ] = "*";
}
- if ( resp.set ) {
- resp.set( headers );
- } else {
- for ( const key in headers ) {
- resp.writeHead( 200, { [ key ]: headers[ key ] } );
- }
- }
+ resp.writeHead( 200, headers );
if ( req.query.callback ) {
resp.end( `${ cleanCallback( req.query.callback ) }(${ JSON.stringify( {