forked from collective/collective.xsendfile
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Added optional ability to fall back to zope's native file serving - b…
…ased on the request header HTTP_X_FORWARDED_FOR
- Loading branch information
Showing
4 changed files
with
61 additions
and
15 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,25 +1,40 @@ | ||
<configure | ||
xmlns="http://namespaces.zope.org/zope" | ||
xmlns:monkey="http://namespaces.plone.org/monkey" | ||
xmlns:five="http://namespaces.zope.org/five"> | ||
xmlns:five="http://namespaces.zope.org/five" | ||
xmlns:browser="http://namespaces.zope.org/browser" | ||
xmlns:genericsetup="http://namespaces.zope.org/genericsetup" | ||
xmlns:i18n="http://namespaces.zope.org/i18n" | ||
i18n_domain="collective.xsendfile" | ||
> | ||
|
||
<five:registerPackage package="." initialize=".zope2.initialize" /> | ||
|
||
<include package="collective.monkeypatcher" /> | ||
<!-- Control panel --> | ||
<include package="plone.registry" /> | ||
<include package="plone.app.registry" /> | ||
<browser:page | ||
name="xsendfile-settings" | ||
for="Products.CMFPlone.interfaces.IPloneSiteRoot" | ||
class=".controlpanel.xsendfileSettingsControlPanel" | ||
permission="cmf.ManagePortal" | ||
/> | ||
|
||
<!-- Monkey patcher --> | ||
<include package="collective.monkeypatcher" /> | ||
<monkey:patch | ||
description="Add support for XSendfile" | ||
class="plone.app.blob.field.BlobField" | ||
original="index_html" | ||
replacement=".utils.index_html" | ||
/> | ||
<!-- monkey:patch | ||
description="Add support for XSendfile" | ||
class="Products.ATContentTypes.content.file.ATFile" | ||
original="index_html" | ||
replacement=".utils.index_html" | ||
/ --> | ||
|
||
|
||
<genericsetup:registerProfile | ||
name="default" | ||
title="collective.xsendfile installation" | ||
directory="profiles/default" | ||
description="Installs the collective.xsendfile package" | ||
provides="Products.GenericSetup.interfaces.EXTENSION" | ||
/> | ||
|
||
</configure> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters