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

domain is now required as a string, and null does not pass validation #64

Closed
mshick opened this issue Apr 20, 2015 · 4 comments
Closed

domain is now required as a string, and null does not pass validation #64

mshick opened this issue Apr 20, 2015 · 4 comments
Assignees
Labels
Milestone

Comments

@mshick
Copy link
Contributor

@mshick mshick commented Apr 20, 2015

Hapi's server.state accepts domain: null as an option, and this is a useful setting for me when in active development, because devs all use different local domains.

I think schema validation should be updated, and the logic here adapted to check property presence, not truthiness:

if (settings.hasOwnProperty('domain')) {
  cookieOptions.domain = settings.domain;
}
@jaw187

This comment has been minimized.

Copy link
Contributor

@jaw187 jaw187 commented Apr 21, 2015

If domain is omitted from options, it will default to null via https://github.com/hapijs/statehood/blob/master/lib/index.js#L47

@mshick

This comment has been minimized.

Copy link
Contributor Author

@mshick mshick commented Apr 22, 2015

Okay, fair enough. Similar to redirectTo I would like the ability to explicitly set a null value. request / enhancement seems right. Feel free to close it (and the PR) if you're not interested.

@jaw187 jaw187 closed this May 4, 2015
@jaw187

This comment has been minimized.

Copy link
Contributor

@jaw187 jaw187 commented May 4, 2015

Version 2.2.0 has the update for this

@mshick

This comment has been minimized.

Copy link
Contributor Author

@mshick mshick commented May 5, 2015

Great, thanks!

On May 4, 2015, at 3:54 PM, James Weston notifications@github.com wrote:

Version 2.2.0 has the update for this


Reply to this email directly or view it on GitHub #64 (comment).

@hueniverse hueniverse added this to the 2.2.0 milestone May 29, 2015
@Marsup Marsup added feature and removed request labels Sep 21, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
4 participants
You can’t perform that action at this time.