1

I have just started using angular via webpack to bring up a client webserver via

        "serve": {
                "builder": "@angular-builders/custom-webpack:dev-server",
                "options": {
                    "browserTarget": "myClientProject:build",
                    "proxyConfig": "./config/angular-proxy.conf.ts",
                    "port": 9006,
                    "host": "dev.mydomain.com",
                    "deployUrl": "",
                    "ssl": true
                },

When I try to hit the website via https://dev.mydomain:9006, Firefox gives me the error:

Did Not Connect: Potential Security Issue Firefox detected a potential security threat and did not continue to dev.bulbapp.com because this website requires a secure connection.

dev.mydomain.com has a security policy called HTTP Strict Transport Security (HSTS), which means that Firefox can only connect to it securely. You can’t add an exception to visit this site.

And my only options are 'Go Back' and 'Advanced...'. If I click 'Advanced', it doesn't allow me to ignore, or exclude, and just simply makes me go back. According to one post I saw from Firefix, the HSTS protocol doesn't allow a browser to let a user override it, so therefore Firefox doesn't.

I used to use a grunt-connect server as my dev client server and never had this issue. Now, after changing to using angular's server I can't get past the error. Is there a way to disable HSTS in the angular server so that Firefox doesn't reject it? Or bypass it some other way?

I read some posts regarding removing entries from the Firefox SiteSecurityServiceState.txt, but that didn't work.

I have tried to turn off SSL, but other portions of the project force HTTPS to be enabled.

I know that the webpack:dev-server actually allows a lot of options regarding HTTPS, but I don't know how to pipe those options through the custom-webpack:dev-server configuration to the standard webpack:dev-server.

DavidA
  • 3,984
  • 5
  • 25
  • 38

0 Answers0