Skip to content

Commit

Permalink
Ansible role properities should be prefixed with role name
Browse files Browse the repository at this point in the history
  • Loading branch information
wsmirnow committed Jan 31, 2025
1 parent 338e704 commit 7024784
Show file tree
Hide file tree
Showing 3 changed files with 9 additions and 9 deletions.
4 changes: 2 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -16,9 +16,9 @@ to generate Diffie-Hellman parameters. You therefor need to have the [community.
Role Variables
--------------

- `opencast_storage_downloads_path`
- `opencast_nginx_storage_downloads_path`
- Path to Opencast's downloads directory (default: `/srv/opencast/downloads/`)
- `opencast_cors_urls`
- `opencast_nginx_cors_urls`
- List of URLs to add CORS exceptions for (default: `[]`)


Expand Down
4 changes: 2 additions & 2 deletions defaults/main.yml
Original file line number Diff line number Diff line change
@@ -1,3 +1,3 @@
---
opencast_cors_urls: []
opencast_storage_downloads_path: /srv/opencast/downloads/
opencast_nginx_cors_urls: []
opencast_nginx_storage_downloads_path: /srv/opencast/downloads/
10 changes: 5 additions & 5 deletions templates/nginx.conf
Original file line number Diff line number Diff line change
Expand Up @@ -56,12 +56,12 @@ http {
}
}

{% if opencast_cors_urls %}
{% if opencast_nginx_cors_urls %}
map_hash_bucket_size 128;

map $http_origin $cors_ok {
default 0;
{% for url in opencast_cors_urls %}
{% for url in opencast_nginx_cors_urls %}
{{ url }} 1;
{% endfor %}
}
Expand Down Expand Up @@ -93,10 +93,10 @@ http {

location /protected {
internal;
alias {{ opencast_storage_downloads_path }};
alias {{ opencast_nginx_storage_downloads_path }};

# CORS configuration
{% if opencast_cors_urls %}
{% if opencast_nginx_cors_urls %}
add_header Access-Control-Allow-Origin '$cors_origin';
add_header Access-Control-Allow-Credentials '$cors_credentials';
{% else %}
Expand Down Expand Up @@ -135,7 +135,7 @@ http {
proxy_request_buffering off;

# CORS configuration
{% if opencast_cors_urls %}
{% if opencast_nginx_cors_urls %}
add_header Access-Control-Allow-Origin '$cors_origin';
add_header Access-Control-Allow-Credentials '$cors_credentials';
{% else %}
Expand Down

0 comments on commit 7024784

Please sign in to comment.