alvarcarto / url-to-pdf-api

Web page PDF/PNG rendering done right. Self-hosted service for rendering receipts, invoices, or any content.
MIT License
7.03k stars 779 forks source link

Support cookies #9

Closed sbeckeriv closed 7 years ago

sbeckeriv commented 7 years ago

I would not want to pass the hosted version auth cookies but locally I would like to pass in a url and a cookie to be set. This would allow me to generate, locally, pdfs of my authenticated pages.

Thanks. It looks neat.

Becker

kimmobrunfeldt commented 7 years ago

This would be a good feature definitely. I'll try to figure what could be a good way to solve this.

kimmobrunfeldt commented 7 years ago

@steakunderscore already started working on a PR, awesome!

I know it's not a direct solution to this but it would also be possible to implement url token based authentication, e.g.: https://myapp.com/receipts/xyz?token=<longtoken>. This is what I've personally planned to be able to render receipts.

sbeckeriv commented 7 years ago

Hello,

I did not see a related commit. Is there one coming or is not going to be implemented.

The token idea will not work for my needs.

Thank you again Becker

kimmobrunfeldt commented 7 years ago

I believe this PR should solve your use case: https://github.com/alvarcarto/url-to-pdf-api/pull/21. It was merged to master.

Feel free to reopen this if you'd need something else. Thanks!