pdf-rendering-srv icon indicating copy to clipboard operation
pdf-rendering-srv copied to clipboard

HTTP support

Open barrypitman opened this issue 10 months ago • 1 comments

It looks like the rewrite only supports HTTPS, but I can't see how I can configure SSL for the service, and it only appears to expose a port which is running an HTTP server. Am I missing something?

e.g. if I run this:

docker run -p 9000:9000 -it --rm restorecommerce/pdf-rendering-srv:latest

and use cURL as per the docs:

curl -o google.pdf -v -XGET https://localhost:9000/api/render?url=http://google.com

I see this in the logs:

2024-04-20T19:05:10.900Z - warn: [error-logger.js] Request parameters:
2024-04-20T19:05:10.900Z - warn: [error-logger.js] Request body:
2024-04-20T19:05:10.900Z - warn: [error-logger.js] Error: Only HTTPS allowed.
2024-04-20T19:05:40.932Z - warn: [error-logger.js] Request headers: host=localhost:9000, user-agent=curl/7.68.0, accept=*/*

barrypitman avatar Apr 20 '24 19:04 barrypitman