0

I am trying to generate a PDF, from html, on a web application written in PHP. The wkhtmltopdf (with phpwrapper) does a call to a local URL, but it does an external call just as if it were not on the same domain as the pages it is trying to render.

What do I need to configure to allow access to the URL using authorisation credentials. I have no experience in API / Oauth.

I am a total beginner in web application / apache security.

Is there a way to configure the page to allow access from the same domain the PDF generation script is running on?

I can not find a useful overview / tutorial for beginners on how to allow access to secure URL's by passing credentials (that are not username and password) in a URL. I have used API calls on Shopify where they use basic authorisation, but I have a curl script that has lot's of configuration in it. Does that suggest I need to create an API on my web app? It seems overkill for such a simple request. I am not down-playing the need for security, my web app is secure, but there must be a way to lock down requests to the same IP as the calling script...

Andy Hayes
  • 11
  • 3
  • Do you need to make an HTTP call? If you are on the same system, can you just `include` or similar? – Chris Haas Nov 10 '21 at 13:11
  • Thanks @ChrisHaas - it is the wkhtmltopdf that is making an external call, I dno't want to, but that is how it works, it seems. – Andy Hayes Nov 10 '21 at 13:22

0 Answers0