Skip to content
This repository has been archived by the owner on Oct 10, 2021. It is now read-only.

Commit

Permalink
Merge pull request #4 from Islandora-Devops/external-content
Browse files Browse the repository at this point in the history
Config for external content
  • Loading branch information
seth-shaw-unlv authored Apr 30, 2019
2 parents 5be6f02 + 88a9f6e commit 9f2c9b2
Show file tree
Hide file tree
Showing 4 changed files with 32 additions and 0 deletions.
13 changes: 13 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -56,6 +56,19 @@ Header name to acquire roles from
fcrepo_auth_header_name:
```

Islandora takes advantage of fcrepo's external content feature. To enable redirects / proxying, you need to configure:

Where the config file gets stored:
```
fcrepo_allowed_external_content_file: "{{ fcrepo_config_dir }}/allowed-external-content.txt"
```

What paths/urls to expose:
```
fcrepo_allowed_external_content:
- http://localhost:8000/
```


## Dependencies

Expand Down
8 changes: 8 additions & 0 deletions defaults/main.yml
Original file line number Diff line number Diff line change
Expand Up @@ -5,4 +5,12 @@ fcrepo_war_path: "{{ tomcat8_home }}/webapps/fcrepo.war"
fcrepo_home_dir: /opt/fcrepo
fcrepo_activemq_template: activemq.xml.j2
fcrepo_config_dir: "{{ fcrepo_home_dir }}/configs"

# External content paths can be directories or urls,
# and they MUST end in /
fcrepo_allowed_external_content:
- http://localhost:8000/

fcrepo_allowed_external_content_file: "{{ fcrepo_config_dir }}/allowed-external-content.txt"

fcrepo_auth_header_name:
8 changes: 8 additions & 0 deletions tasks/config.yml
Original file line number Diff line number Diff line change
Expand Up @@ -17,3 +17,11 @@
owner: "{{ fcrepo_user }}"
group: "{{ fcrepo_user }}"
notify: restart tomcat8

- name: Template out allowed external content paths
template:
src: allowed-external-content.txt.j2
dest: "{{ fcrepo_allowed_external_content_file }}"
owner: "{{ fcrepo_user }}"
group: "{{ fcrepo_user }}"
notify: restart tomcat8
3 changes: 3 additions & 0 deletions templates/allowed-external-content.txt.j2
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
{% for item in fcrepo_allowed_external_content %}
{{ item }}
{% endfor %}

0 comments on commit 9f2c9b2

Please sign in to comment.