Skip to content
New issue

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

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

Already on GitHub? Sign in to your account

Add 'allow' parameter to methodNotAllowed for setting 'Allow' header #133

Merged
merged 2 commits into from Oct 13, 2016

Conversation

@lukasolson
Copy link
Contributor

lukasolson commented Oct 12, 2016

Closes #132.

This PR adds an optional allow parameter to Boom.methodNotAllowed, which in turn sets the "Allow" header on the output, as required in the spec. It accepts either a string or an array of strings to be combined and comma-separated.

allow = [allow];
}

if (Array.isArray(allow)) {

This comment has been minimized.

Copy link
@arb

arb Oct 13, 2016

Contributor

Can you change this to an else if?

This comment has been minimized.

Copy link
@Marsup

Marsup Oct 13, 2016

Member

This is not supposed to be an else.

This comment has been minimized.

Copy link
@lukasolson

lukasolson Oct 13, 2016

Author Contributor

Happy to make it clearer if needed, but that's correct, it would break if it were an if/else.

This comment has been minimized.

Copy link
@arb

arb Oct 13, 2016

Contributor

Oops. Misread 👍

@arb arb modified the milestone: 4.2.0 Oct 13, 2016
@arb arb added the feature label Oct 13, 2016
@arb arb self-assigned this Oct 13, 2016
@arb arb merged commit aade1dd into hapijs:master Oct 13, 2016
1 check passed
1 check passed
continuous-integration/travis-ci/pr The Travis CI build passed
Details
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
3 participants
You can’t perform that action at this time.