Problem/Motivation

When developing https://www.drupal.org/project/stratoserp one thing that has been blocking me has the ability to get nice printouts with wkhtmltopdf from within the docker container. The docker containers are typically accessed from behind a proxy and have https access, but the actual container port is 8080, not 80 or 443.

This results in an unstyled pdf from entity_print, but the debug url version works fine.

Steps to reproduce

To reproduce, deploy a docker container with something like https://github.com/singularo/s2i-shepherd-drupal/blob/develop/Dockerfile with drupal and entity print. For local dev i use jwilder/nginx-proxy and a localhost ssl cert.

Proposed resolution

Attached patch feels a bit hacky, but solved it for me and didn't require introducing a base_url which would mean it needs to be configured for each site.

Remaining tasks

Not really expecting this to be committed, just wanted to share in case others come across the same issue. If you've solved it a different way, please share!

Support from Acquia helps fund testing for Drupal Acquia logo

Comments

singularo created an issue. See original summary.

singularo’s picture

singularo’s picture

Issue summary: View changes
larowlan’s picture

We could support a configurable base url that used the current code as a fallback

singularo’s picture

I actually did that as well, and I think that will work for my use case, maybe custom base_url is a common enough thing it can just be added to the UI.