Skip to content
New issue

Have a question about this project? # for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “#”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? # to your account

CORS fitting not being configured with params in default.yaml #111

Open
bergundy opened this issue Oct 17, 2017 · 3 comments
Open

CORS fitting not being configured with params in default.yaml #111

bergundy opened this issue Oct 17, 2017 · 3 comments

Comments

@bergundy
Copy link

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?

@theganyo
Copy link
Collaborator

Yeah, cool thought. Though it's a breaking change.

@bergundy
Copy link
Author

@theganyo how is it breaking?
What am I missing?
Is there another way to configure the CORS middleware?

@theganyo
Copy link
Collaborator

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.

# for free to join this conversation on GitHub. Already have an account? # to comment
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants