Skip to content
New issue

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

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

Already on GitHub? # to your account

Snippet with HTTPS #459

Closed
leigeber opened this issue Feb 17, 2015 · 4 comments · May be fixed by tobybellwood/govstrap#4
Closed

Snippet with HTTPS #459

leigeber opened this issue Feb 17, 2015 · 4 comments · May be fixed by tobybellwood/govstrap#4
Labels

Comments

@leigeber
Copy link

Looking over recent activity I got the impression that injecting a snippet with HTTPs should work. However with the following config and loading a site through MAMP locally with HTTPs the snippet does not load. The snippet is correctly loading from https://domain.dev:3000/browser-sync/browser-sync-client.2.1.4.js however it only works if requested from HTTP.

Here is the server config object we're passing to the browserSync method:

{
    https: true,
    files: [
        'public_html/assets/**/*.{min.css,min.js,gif,jpg,png,svg}',
        'public_html/**/*.html'
    ],
    port: 3000,
    logPrefix: 'Wee',
    open: 'external',
    notify: false,
    ui: {
        port: 3001,
        weinre: {
            port: 3002
        }
    }
}

Am I missing something with the settings or is this not supported currently? Thanks!

@shakyShane shakyShane added the bug label Feb 17, 2015
@shakyShane
Copy link
Contributor

No this is bug, I missed the HTTPS support for the snippet only (as it's a different server)

@shakyShane
Copy link
Contributor

@leigeber
Copy link
Author

Look straightforward enough, if you want a pull request to squash this one let me know.

@shakyShane
Copy link
Contributor

Sure - that would be great.

You can see how it's done here with the static server.

https://github.com/BrowserSync/browser-sync/blob/master/lib/server/static-server.js#L72-L79

For tests, you could add to, or copy this https://github.com/BrowserSync/browser-sync/blob/master/test/specs/e2e/e2e.snippet.js

:)

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

Successfully merging a pull request may close this issue.

2 participants