My YunoHost server
Hardware: VPS bought online
YunoHost version: latest
I have access to my server : Through SSH | through the webadmin | direct access via keyboard / screen | …
Are you in a special context or did you perform some particular tweaking on your YunoHost instance ? : no
Description of my issue
I would like to enable CORS for our PDF books stored on our NextCloud. I tried so many methods but didn’t manage to. I tried adding CORS nginx code to /etc/nginx/conf.d/www.drive.tromsite.com.d/nextcloud.conf …
I come from Apache and we had this:
SetEnvIf Origin "^http(s)?://(.+\.)?(tromsite\.com|tromsite\.de)$" origin_is=$0
Header always set Access-Control-Allow-Origin %{origin_is}e env=origin_is
Header always set Access-Control-Allow-Headers "range"
Header always set Access-Control-Expose-Headers: "Accept-Ranges, Content-Encoding, Content-Length, Content-Range"
Header always set Access-Control-Allow-Methods: "POST, GET, OPTIONS"
Header always set Accept-Ranges "bytes"
Header always set Access-Control-Allow-Credentials "true"
Header always set Strict-Transport-Security: "max-age=31536000"
It worked, but on nginx I do not know how to do it.