HTML Include Macro auth headers

The HTML Inclue  Macro is enabled in our confluence server instance and the URL we wish to use been whitelisted.  However, the macro fails with 'Page not permitted.'

The URL is an internal link, somethink like:

http://jobs.example.com:9191/cgi-bin/qsp.cgi/tests?category=Rate

Next, I checked if I could fetch the URL using PowerShell's WebClient.  That failed intially with the error ""The remote server returned an error: (401) Unauthorized."   Apparently, .NET webservers require authentication headers on non default ports like 9191.  When I specified UseDefaultCredentials, it worked in PowerShell.

The powershell script looks like:

$client = new-object System.Net.WebClient 
$client.UseDefaultCredentials = $True 
$url = http://jobs.example.com:9191/cgi-bin/qsp.cgi/tests?category=Rates
$client.DownloadFile( $url, "H:\temp\out.html")


It still won't work in the HTML Include Macro.  Are auth headers sent by the macro? 

 

1 answer

0 vote
Davin Studer Community Champion Nov 12, 2014

"Apparently, .NET webservers require authentication headers on non default ports like 9191."

No, that's not really true. You probably don't have anonymous access enabled for that site in IIS.

Suggest an answer

Log in or Sign up to answer
Atlassian Community Anniversary

Happy Anniversary, Atlassian Community!

This community is celebrating its one-year anniversary and Atlassian co-founder Mike Cannon-Brookes has all the feels.

Read more
Community showcase
Kesha Thillainayagam
Posted Apr 13, 2018 in Confluence

We want to hear how your non-technical teams are using Confluence!

Hi Community! Kesha (kay-sha) from the Confluence marketing team here! Can you share stories with us on how your non-technical (think Marketing, Sales, HR, legal, etc.) teams are using Confluen...

355 views 20 10
Join discussion

Atlassian User Groups

Connect with like-minded Atlassian users at free events near you!

Find a group

Connect with like-minded Atlassian users at free events near you!

Find my local user group

Unfortunately there are no AUG chapters near you at the moment.

Start an AUG

You're one step closer to meeting fellow Atlassian users at your local meet up. Learn more about AUGs

Groups near you