Page 1 of 1

fetch from non-public documents?

Posted: Thu Oct 30, 2014 9:43 am
by tboyer
We have HTML documents we would like to store in a non-public place but make available to authenticated users using <fetch>. Is there a way to configure a server to do this? We could use <spew> or <read> but they obviously don't pick up image or style from the document tree.

Thanks.

fetch from non-public documents?

Posted: Thu Oct 30, 2014 10:55 am
by mark
If the image and style assests don't need to be protected you can just ask for and check credentials in vortex before spewing the file. As far as the browser is concerned it's like any other html file and will load the assests normally, as long as they're specified with full paths instead of relative.

fetch from non-public documents?

Posted: Thu Oct 30, 2014 11:26 am
by tboyer
Relative paths unfortunately. That's why fetch was intriguing because it has reparenting built in.

fetch from non-public documents?

Posted: Thu Oct 30, 2014 11:44 am
by mark
You could <read> in the file and pass it through <fetch> to reparent.

But for reference, you could create a .htaccess protected area and use urlcp user and pass to access it via fetch as you were considering.