Skip to content

Provide a way to serve localhost through HTTPS #60704

Closed

Description

@jlubeck

Use case

I need to test input validations and autofills on a form that takes credit card information.
When running flutter run -d web-server or flutter run -d chrome it opens up a website served on localhost through HTTP. That disallows the autofill for credit card information as you can see on this screenshot:

Screen Shot 2020-07-01 at 12 26 56 PM

If I were in control of the web-server configuration, I could maybe pass in some options to include an SSL certificate for localhost. Like its mentioned here: https://stackoverflow.com/questions/54735136/how-to-enable-chrome-credit-card-autofill-for-http-and-localhost

Proposal

Need a way to pass SSL certs (and maybe other options) when starting up a web-server through flutter

Activity

  1. added
    platform-webWeb applications specifically
    c: new featureNothing broken; request for a new capability
    toolAffects the "flutter" command-line tool. See also t: labels.
    on Jul 1, 2020
  2. jonahwilliams commented on Jul 1, 2020

    @jonahwilliams
    Contributor

    Seems like adding an optional dependency on mkrcert and then exposing a command line option to run via https would be a useful feature in general.

  3. added
    P3Issues that are less important to the Flutter project
    on Jul 1, 2020
  4. MichealReed commented on Jul 14, 2020

    @MichealReed
    Contributor

    @jonahwilliams any workarounds to serve https until then?

  5. jonahwilliams commented on Jul 14, 2020

    @jonahwilliams
    Contributor

    Not that I'm aware of

  6. MichealReed commented on Jul 14, 2020

    @MichealReed
    Contributor

    No worries, easy enough to deploy a test site via firebase.

  7. bitelyus commented on Jan 31, 2021

    @bitelyus

    ... and we need it now :) ... loving flutter

  8. SergeBerwert commented on Apr 19, 2021

    @SergeBerwert

    I have the problem with authentication. I need https to test app's with authentication

  9. mrtdeh commented on Aug 12, 2021

    @mrtdeh

    I need https in localhost...

  10. DesmondFox commented on Oct 11, 2021

    @DesmondFox

    any progress?

  11. siva2204 commented on Oct 21, 2021

    @siva2204

    i'm working with grpc(http2) as backend, badly need https

  12. ricksondpenha commented on Nov 25, 2021

    @ricksondpenha

    Hi any update on this? we are building a enterprise web app and we need https on local dev for testing payments service such as credit/debit cards. Its a hassle right now since browsers dont allow access to credit cards over http. badly need this support right now. Is there a work around? like using a custom web server and deploy it?

  13. 35 remaining items

  14. shamilsun commented on Jul 7, 2023

    @shamilsun

    Terrible, havent solution for 2 years.

    my case is also for cookie support on dev side,

    i hve tried

    1. using nginx reverse - nothing! coz crashed on wss
    2. some options to launch with flags or switch cookie to lax, strict, .. for me its no option coz backend is outside

    to be clear

    need solution to run "flutter run -d chrome" locally with full console support and application must use https serve, not http.

    currently i solved my problem to work with cookies by diffrent way,
    but hope in future request to serve localhost on https in flutter d web will be fixed

  15. marcov-dart commented on Jul 12, 2023

    @marcov-dart

    I did manage to get my flutter app running in debug mode behind nginx reverse proxy.
    I commented out the proxy_set_header and proxy_cache_bypass in the config.

    location / {
    proxy_pass http://localhost:50068;
    proxy_http_version 1.1;
    proxy_set_header Upgrade $http_upgrade;
    proxy_set_header Connection "upgrade";
    #proxy_set_header Host $host;
    #proxy_cache_bypass $http_upgrade;
    #proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
    #proxy_set_header X-Forwarded-Proto $scheme;
    #proxy_set_header X-Real-IP $remote_addr;
    }

  16. JustroX commented on Oct 5, 2023

    @JustroX

    I definitely agree with @hampsterx, this is also the issue that I consider the final straw. Moved away from flutter since then.

  17. erickok commented on Oct 5, 2023

    @erickok

    While I agree this issue can be a real obstacle for web development, I am not sure ranting about it here will help you in any way. And claiming that no one is using Flutter on web is short-sighted at best. It it doesn't offer what your use-case needs, I understand, but a tirade in a bug ticket isn't going to help you with that.

  18. added a commit that references this issue on Nov 16, 2023
  19. github-actions commented on Nov 30, 2023

    @github-actions

    This thread has been automatically locked since there has not been any recent activity after it was closed. If you are still experiencing a similar issue, please open a new bug, including the output of flutter doctor -v and a minimal reproduction of the issue.

  20. locked as resolved and limited conversation to collaborators on Nov 30, 2023
  21. ditman commented on Feb 14, 2024

    @ditman
    Member

    Flutter run added support for TLS connections in localhost with self-signed certs, check this out:

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    P3Issues that are less important to the Flutter projectc: new featureNothing broken; request for a new capabilitycustomer: flexplatform-webWeb applications specificallyteam-webOwned by Web platform teamtoolAffects the "flutter" command-line tool. See also t: labels.triaged-webTriaged by Web platform team

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions