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

Privacy error when trying to configure SSL #225

Closed
jrdn91 opened this issue Dec 1, 2016 · 2 comments
Closed

Privacy error when trying to configure SSL #225

jrdn91 opened this issue Dec 1, 2016 · 2 comments

Comments

@jrdn91
Copy link

jrdn91 commented Dec 1, 2016

I get the privacy error in chrome when trying to load the server. I followed the readme docs for generatice a cert and key and all that and have the settings as such

connect: {
      options: {
        protocol: 'https', // or 'http2'
        port: 8443,
        key: grunt.file.read('server.key').toString(),
        cert: grunt.file.read('server.crt').toString(),
        ca: grunt.file.read('ca.crt').toString(),
        // Change this to '0.0.0.0' to access the server from outside.
        hostname: 'localhost'
      },
      livereload: {
        options: {
          open: true,
          port: 8443,
          key: grunt.file.read('server.key').toString(),
          cert: grunt.file.read('server.crt').toString(),
          middleware: function (connect) {
            return [
              modRewrite(['^[^\\.]*$ /index.html [L]']),
              connect.static('.tmp'),
              connect().use(
                '/bower_components',
                connect.static('./bower_components')
              ),
              connect().use(
                '/app/styles',
                connect.static('./app/styles')
              ),
              connect.static(appConfig.app)
            ];
          }
        }
      },
...

My livereload settings look like this

watch: {
      bower: {
        files: ['bower.json'],
        tasks: ['wiredep']
      },
      js: {
        files: ['<%= yeoman.app %>/scripts/**/*.js'],
        tasks: ['newer:jshint:all', 'newer:jscs:all'],
        options: {
          livereload: '<%= connect.options.livereload %>'
        }
      },
      jsTest: {
        files: ['test/spec/{,*/}*.js'],
        tasks: ['newer:jshint:test', 'newer:jscs:test', 'karma']
      },
      styles: {
        files: ['<%= yeoman.app %>/styles/{,*/}*.scss'],
        tasks: ['sass:dev']
      },
      gruntfile: {
        files: ['Gruntfile.js']
      },
      livereload: {
        options: {
          livereload: '<%= connect.options.livereload %>'
        },
        files: [
          '<%= yeoman.app %>/**/*.html',
          '.tmp/styles/{,*/}*.css',
          '<%= yeoman.app %>/images/{,*/}*.{png,jpg,jpeg,gif,webp,svg}'
        ]
      }
    },

I'm using the Yeoman Angular generator, which created this layout.

I've also added both the server.crt and ca.crt to my keychain access un the system keychanin, and given them both Always Trust permissions, and restarted Chrome after to make sure.

Maybe there is something with the way the connect server is being configured that the yeoman generator is doing a little different than the readme is explaining? Can anyone make sense of this?

@KrzysztofKarol
Copy link

@XhmikosR
Copy link
Member

XhmikosR commented Sep 9, 2018

Duplicate of #193.

@XhmikosR XhmikosR closed this as completed Sep 9, 2018
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

3 participants