@karadayi,
The location directive is defined in a proper fashion, even though you can still try to use parentheses (i.e. "Access-Control-Allow-Origin") (note that it should not make a difference).
The problem is very likely to be present in the lines before the location directive, being the lines concerning gzip.
Note that the gzip ruleset is not really required, it does not always yield the highest page load performance, but let´s not discuss about this.
I would suggest to
a) remove the gzip ruleset completely, in order to test for the correct definition of the location directive, and
b) re-introduce the gzip ruleset, with
- the "#text/html is always compr..... " comment removed,
- the "gzip types" on one line (not multiple lines, as is the case, in your custom nginx configuration)
and that should do the trick.
Kind regards.....