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

How do you set default_host? #239

Closed
ioquatix opened this issue Nov 5, 2018 · 4 comments
Closed

How do you set default_host? #239

ioquatix opened this issue Nov 5, 2018 · 4 comments

Comments

@ioquatix
Copy link
Member

ioquatix commented Nov 5, 2018

It's not clear where or how this should be set. Thanks.

@ioquatix
Copy link
Member Author

ioquatix commented Nov 5, 2018

So, what I'm trying to test is the secure attribute of cookies

https://github.com/rack-test/rack-test/blob/master/lib/rack/test/cookie_jar.rb

It needs to have a "https" uri scheme from what I can tell, but I'm not sure how to set this.

@perlun
Copy link
Contributor

perlun commented Nov 14, 2018

@ioquatix I'm not quite sure you can set it but maybe this can help?

https://github.com/rack-test/rack-test/blob/master/spec/rack/test_spec.rb#L222-L237

I.e., specify the full URL including scheme in your get/etc call and the rest should then, hopefully, also be considered a secure/HTTPS request.

@ioquatix
Copy link
Member Author

Okay that makes more sense. I still wonder if there should be some way to set the default domain/scheme/url.

@perlun
Copy link
Contributor

perlun commented Nov 23, 2018

@ioquatix

Okay that makes more sense. I still wonder if there should be some way to set the default domain/scheme/url.

Sure, play around with it if you need it. Feel free to submit a PR and I'll give it a look.

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

No branches or pull requests

2 participants