Skip to content

Commit 5fcfd90

Browse files
committed
feat(ci/cd): add cors allowance for dataverse
1 parent 9500d2e commit 5fcfd90

1 file changed

Lines changed: 11 additions & 0 deletions

File tree

tasks/dataverse-postinstall.yml

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -19,6 +19,17 @@
1919
shell: "{{ payara_dir }}/bin/asadmin create-jvm-options -Djava.io.tmpdir={{ dataverse.payara.tempdir }}"
2020
when: dataverse.payara.tempdir is defined
2121

22+
- name: Configure Dataverse CORS JVM options
23+
become: yes
24+
become_user: "{{ dataverse.payara.user }}"
25+
shell: |
26+
{{ payara_dir }}/bin/asadmin create-jvm-options \
27+
"-Ddataverse.cors.origin=*" \
28+
"-Ddataverse.cors.methods=GET,POST,OPTIONS,PUT,DELETE" \
29+
"-Ddataverse.cors.headers.allow=*" \
30+
"-Ddataverse.cors.headers.expose=ETag,Accept-Ranges,Content-Encoding,Content-Range,Accept,Content-Type,X-Dataverse-key,Range"
31+
when: dataverse.payara.user is defined
32+
2233
- ansible.builtin.import_tasks: custom_metadata_blocks.yml
2334
when: dataverse.custom_metadata_blocks.enabled == True
2435

0 commit comments

Comments
 (0)