swagger-node-runner
swagger-node-runner copied to clipboard
CORS fitting not being configured with params in default.yaml
The call to create the CORS object in https://github.com/theganyo/swagger-node-runner/blob/master/fittings/cors.js#L11 passes an object that looks like:
{
"name": "cors",
"input": { "some": "params passed in default.yaml" }
}
Changing that line to:
var middleware = CORS(fittingDef.input);
allows actually passing variables.
WDYT?
Yeah, cool thought. Though it's a breaking change.
@theganyo how is it breaking? What am I missing? Is there another way to configure the CORS middleware?
Ah, I see. Sorry. Yes, I think you're right... the intent was to be able to configure it in the yaml, but it seems there should have been tests to verify that.