#######################
#### REACT EXAMPLE ####
#######################

#### React app's build folder was added to root via:
#### webserver static add example.com /path/to/build
#    root /usr/share/nginx/html/{{SERVER_NAME}};

#### JavaScript and CSS files from React app build folder
#### Filename contains unique hash, so we can cache them for a year
#    location ^~ /static/ {
#        expires 365d;
#        access_log off;
#        add_header Cache-Control "public";

#        limit_except GET {
#            deny all;
#        }
#    }

#### Website icons
#    location =/favicon.ico {
#        expires 30d;
#        access_log off;
#        add_header Cache-Control "public";

#        limit_except GET {
#            deny all;
#        }
#    }
#    location =/favicon.png {
#        expires 30d;
#        access_log off;
#        add_header Cache-Control "public";

#        limit_except GET {
#            deny all;
#        }
#    }

#### Should catch everything else in build folder
#    location / {
#        #### This way React-Router will work properly
#        try_files $uri /index.html;

#        limit_except GET {
#            deny all;
#        }
#    }
