I have done a search through the issue queue, and couldn't find a similar posting to this, so my apologies if this is a duplicate.

When building sites for clients, we commonly use HTTP authorization on non-production sites (such as development, or staging sites) as a means of ensuring that these sites dont get picked up search engines, or that they aren't accessible to anyone other than ourselves and the client.

Currently with Entity Print 8.x-1.x, when testing on such a site the PDF generation fails with 401 Authorization Required error. This means any HTTP authorization has to be turned off to allow the PDF generation to be tested.

Would it be possible to add a 'develop' mode where by any auth details could be added to the settings page for the module?

This way, when PDF generation is tested on a site/server utilising HTTP authorization, these details could be taken into account to avoid the 401 error.

CommentFileSizeAuthor
#6 2820401-6.patch7.36 KBbenjy
#5 2820401-5.patch2.41 KBbenjy
Support from Acquia helps fund testing for Drupal Acquia logo

Comments

hydrant-mark created an issue. See original summary.

hiraethmarkb’s picture

Issue summary: View changes
benjy’s picture

Are you using the wkhtmltopdf engine?

benjy’s picture

I tested this quickly on 8.x-2.x but It worked as expected, any tips on how to reproduce this? What are you using to implement httpauth?

benjy’s picture

Version: 8.x-1.x-dev » 8.x-2.x-dev
Status: Active » Needs review
FileSize
2.41 KB

I was able to reproduce this using apache's httpauth.

benjy’s picture

FileSize
7.36 KB

Added support for Dompdf as well.

benjy’s picture

Status: Needs review » Fixed

Committed.

  • benjy committed ba2a7e6 on 8.x-2.x
    Issue #2820401 by benjy, hydrant-mark: Allow pdf generation to work when...

Status: Fixed » Closed (fixed)

Automatically closed - issue fixed for 2 weeks with no activity.

hoporr’s picture

jeanne.morgan10’s picture

Category: Feature request » Bug report

Getting "Authorisation failed, are your resources behind HTTP authentication? Check the admin page to set credentials." When i try and use DOMPDF. The username and password on the config for entity print don't give any descriptive information on what to do to help and the patches are outdated.