Ah I have found something:
How Does NGINX Determine Whether or Not to Cache Something?
By default, NGINX respects the Cache-Control headers from origin servers. It does not cache responses with Cache-Control set to Private, No-Cache, or No-Store or with Set-Cookie in the response header. NGINX only caches GET and HEAD client requests. You can override these defaults as described in the answers below.
but my question is do I need to set up the backend web server to add the headers or will the website (owncloud and gitlab) automatically add these when on pages that shouldn't be cached