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!
Comment | File | Size | Author |
---|---|---|---|
#5 | 3316982_configurable_base_url.patch | 1.17 KB | singularo |
#2 | 3316982-2.entity_print.Allow-wkhtmltopdf-to-work-in-dockerkubernetes-style-env.patch | 1.22 KB | singularo |
Comments
Comment #2
singularoComment #3
singularoComment #4
larowlanWe could support a configurable base url that used the current code as a fallback
Comment #5
singularoI 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.