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

HTTPS on SSR container is not working anymore #851

Closed
jometzner opened this issue Aug 25, 2021 · 2 comments · Fixed by #1294
Closed

HTTPS on SSR container is not working anymore #851

jometzner opened this issue Aug 25, 2021 · 2 comments · Fixed by #1294
Assignees
Milestone

Comments

@jometzner
Copy link
Collaborator

jometzner commented Aug 25, 2021

Actual Behavior

docker build ... intershop-pwa_pwa
docker run -d -p 4200:4200 -e TRUST_ICM=true -e SSL=1 --restart always --name yourcontainer intershop-pwa_pwa

Starting the ssr container with environment variable SSL=1 does not lead to a functional https://localhost:4200 Instead you receive browser error page telling you ERR_SSL_PROTOCOL_ERROR. Trying to access site with http instead of https doesn't solve this. There you just get http error 504 (gateway timeout).

Expected Behavior

Running the ssr image with SSL=1 must lead to a site that is capable to serve https.

Steps to Reproduce the Bug

  1. Build docker image in project root
  2. Start docker image as container with SSL=1
  3. Open https://localhost:4200 in browser
  4. See error

Technical investigation
Multi-theme support distributes requests based on logic implemented in dist/server.js. In there we are using express-http-proxy which needs to be configured accordingly. See package documentation

AB#69237

@jometzner jometzner added the bug Something isn't working label Aug 25, 2021
@rkarl-ish rkarl-ish added bug:minor and removed bug Something isn't working labels Sep 28, 2021
@dhhyi
Copy link
Collaborator

dhhyi commented Mar 11, 2022

@jometzner @rkarl-ish,

Is this really an issue worth fixing? Usually the PWA deployment contains both nginx and SSR. If used in an actual deployment (i.e. Intershop CaaS), https will be added by the cloud provider by other means.

@jometzner
Copy link
Collaborator Author

Fixing or removing SSL env setting from SSR image... Both ways are an option.

A PWA without nginx in front doesn't make any sense. Therefore the option to have SSL support in SSR would be only interesting for security considerations (i.e. communicating only with trusted services).

shauke pushed a commit that referenced this issue Oct 13, 2022
…#851, #1294)

* Remove self-signed certificates
* Auto-generate self-signed dev cert for nginx container
* Adjust documentation
* Provide shell spec test
@shauke shauke added this to the 3.1 milestone Oct 13, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging a pull request may close this issue.

4 participants