# nginx: serve a file from Artifactory without authentication With the following nginx config you can expose a single file from Artifactory without need to authenticate. __Be sure that you only expose the files that are allowed to be public__ I dont't recommend to run this nginx in the public internet. __Run it only inside your company's firewall!__ No warranty, that is totally safe. ## nginx config The file is exposed using proxy pass. There must be an Artifactory token, which will be send from nginx to Artifactory. The `proxy_hide_header` headers make sure, that there is no Cookie sent to the user, which belongs to the Artifactory token. The caching is recommended to decrease the load on Artifactory. The mime type mapping using `$custom_content_type` is optional, if you need to correct your Content-Type headers, sent to the user. You can also mount the token via a secret: nginx.conf ```txt server { include /secrets/secret.txt; ... proxy_set_header X-JFrog-Art-Api "$AuthValue;" } ``` secret.txt ```txt set $AuthValue "AKsomething123456789"; ```