Gatsby: Missing `--https` option for `gatsby serve`?

Created on 23 Sep 2018  Β·  15Comments  Β·  Source: gatsbyjs/gatsby

Just wondered if there's a rationale behind having no --https option for gatsby serve analog to gatsby develop?

stale? feature or enhancement

Most helpful comment

@kakadiadarpan I don't believe gatsby serve is intended for actually publicly serving the site – it's for _locally_ serving it after it has been built (i.e., for previewing, or testing). Right @KyleAMathews?

If --https is a useful feature for develop (and I think it really is), then it is also a useful feature for serve.

This should be reopened.

All 15 comments

@jazen gatsby serve is a wrapper over serve, it gives all the options that serve gives.

And in my opinion it makes sense not to provide --https option. As generally web application are hosted on a port like 3000 or 9000 or any other available port and then port 443 requests (where all https requests go) are forwarded to that port.

@kakadiadarpan I don't believe gatsby serve is intended for actually publicly serving the site – it's for _locally_ serving it after it has been built (i.e., for previewing, or testing). Right @KyleAMathews?

If --https is a useful feature for develop (and I think it really is), then it is also a useful feature for serve.

This should be reopened.

It's a bit cumbersome to get a local https server setup and also not entirely necessary as most https-only browser features like service workers are active on localhost over http.

Perhaps a compromise would be documenting a good way to run a local https web server?

What about running end-to-end tests? I have tests that check that secure cookies are written. It would be really useful to be able build and serve locally to run tests against.

I agree, I think it would be useful. Maybe along the note "..only intended for preview purposes and not for production.."
I reuse the same tab and address often when switching between dev and serve always forgetting to switch to http as well πŸ€¦β€β™‚οΈ

Edit: Just realized it changed to express under the hood right?

Why has this been closed?
We want to run cypress tests in the pipeline against the production build (because apparently the behaviour sometimes is different than development) and not being able to serve over https makes it impossible, we have some secure cookies that just won't work.
Do you need help implementing the feature maybe?

Hiya!

This issue has gone quiet. Spooky quiet. πŸ‘»

We get a lot of issues, so we currently close issues after 30 days of inactivity. It’s been at least 20 days since the last update here.

If we missed this issue or if you want to keep it open, please reply here. You can also add the label "not stale" to keep this issue open!

As a friendly reminder: the best way to see this issue, or any other, fixed is to open a Pull Request. Check out gatsby.dev/contribute for more information about opening PRs, triaging issues, and contributing!

Thanks for being a part of the Gatsby community! πŸ’ͺπŸ’œ

Hiya!

This issue has gone quiet. Spooky quiet. πŸ‘»

We get a lot of issues, so we currently close issues after 30 days of inactivity. It’s been at least 20 days since the last update here.
If we missed this issue or if you want to keep it open, please reply here. You can also add the label "not stale" to keep this issue open!
As a friendly reminder: the best way to see this issue, or any other, fixed is to open a Pull Request. Check out gatsby.dev/contribute for more information about opening PRs, triaging issues, and contributing!

Thanks for being a part of the Gatsby community! πŸ’ͺπŸ’œ

Hiya!

This issue has gone quiet. Spooky quiet. πŸ‘»

We get a lot of issues, so we currently close issues after 30 days of inactivity. It’s been at least 20 days since the last update here.
If we missed this issue or if you want to keep it open, please reply here. You can also add the label "not stale" to keep this issue open!
As a friendly reminder: the best way to see this issue, or any other, fixed is to open a Pull Request. Check out gatsby.dev/contribute for more information about opening PRs, triaging issues, and contributing!

Thanks for being a part of the Gatsby community! πŸ’ͺπŸ’œ

Not stale. Still important in regards to testing.

Hiya!

This issue has gone quiet. Spooky quiet. πŸ‘»

We get a lot of issues, so we currently close issues after 30 days of inactivity. It’s been at least 20 days since the last update here.
If we missed this issue or if you want to keep it open, please reply here. You can also add the label "not stale" to keep this issue open!
As a friendly reminder: the best way to see this issue, or any other, fixed is to open a Pull Request. Check out gatsby.dev/contribute for more information about opening PRs, triaging issues, and contributing!

Thanks for being a part of the Gatsby community! πŸ’ͺπŸ’œ

@Undistraction / @lucavallin - why do you need https to run the production mode locally for tests? gatsby serve still uses localhost which enables most ssl specific browser APIs. Just curious what situation prevents this from working out.

If this is something ya'll are going to want, would you be willing to contribute a change?

Have a draft version of this here https://github.com/gatsbyjs/gatsby/pull/26110

Hiya!

This issue has gone quiet. Spooky quiet. πŸ‘»

We get a lot of issues, so we currently close issues after 30 days of inactivity. It’s been at least 20 days since the last update here.
If we missed this issue or if you want to keep it open, please reply here. You can also add the label "not stale" to keep this issue open!
As a friendly reminder: the best way to see this issue, or any other, fixed is to open a Pull Request. Check out gatsby.dev/contribute for more information about opening PRs, triaging issues, and contributing!

Thanks for being a part of the Gatsby community! πŸ’ͺπŸ’œ

Hey again!

It’s been 60 days since anything happened on this issue, so our friendly neighborhood robot (that’s me!) is going to close it.
Please keep in mind that I’m only a robot, so if I’ve closed this issue in error, I’m HUMAN_EMOTION_SORRY. Please feel free to comment on this issue or create a new one if you need anything else.
As a friendly reminder: the best way to see this issue, or any other, fixed is to open a Pull Request. Check out gatsby.dev/contribute for more information about opening PRs, triaging issues, and contributing!

Thanks again for being part of the Gatsby community! πŸ’ͺπŸ’œ

Was this page helpful?
0 / 5 - 0 ratings

Related issues

dustinhorton picture dustinhorton  Β·  3Comments

jimfilippou picture jimfilippou  Β·  3Comments

benstr picture benstr  Β·  3Comments

Oppenheimer1 picture Oppenheimer1  Β·  3Comments

totsteps picture totsteps  Β·  3Comments