apiVersion: v1
kind: ConfigMap
metadata:
  name: internal-search-ui-nginx
data:
  default.conf: |
    server {
      listen 8000;

      auth_basic "Restricted Content";
      auth_basic_user_file /etc/nginx/htpasswd/secret-nginx-htpasswd;

      # this is required, otherwise cloudflare caches the private data
      add_header Cache-Control "no-store";

      location /__data/ {
        index null;
        alias /data/;
        autoindex on;

      }

      location /__search/ {
        proxy_pass http://localhost:5000;
      }

      location /__download/ {
        proxy_pass http://localhost:5000;
      }

      location / {
        proxy_pass http://localhost:3000;
      }
    }
