'Prevent Chrome-Headless from enforncing ssl

Setup

I'm running chrome-headless as a container in my docker-compose project. My main app (the one I'd like to test) is named 'app' inside the compose file.

To connect from the chrome-headless container to my app, I'm using the dockers internal containerlinking: http://app:3000

docker-compose.yml

version: '3'

services:
  app:
    build:
      context: .
    ports:
      - 3000:3000

  chrome:
    image: alpeware/chrome-headless-trunk

Problem

While this should be easy going, there is one detail, that makes things complicated: chrome-headless is enforcing ssl on ".app" domains. Since I'm connecting to 'http://app:3000' this rule applies.

When connecting I get this error:

net::ERR_SSL_PROTOCOL_ERROR at http://app:3000

Question

Is there any way to setup chrome-headless to stop enforcing ssl on certain domains? Changing the name from 'app' to something else in the docker-compose.yml actually works, but this seems like a rather ugly workaround.

Thank you



Solution 1:[1]

I had the same issue and I can confirm that changing service name form app to app_anything solved the issue for me as well.

Wanted to post it as an answer there since I've overlooked the solution stated in the question first time when I've opened it ;)

Sources

This article follows the attribution requirements of Stack Overflow and is licensed under CC BY-SA 3.0.

Source: Stack Overflow

Solution Source
Solution 1 MikoSh