
:%%port%% {
	@proxied path /api/* /docs /openapi.json

	@static {
		file
		path *.ico *.css *.js *.gif *.jpg *.jpeg *.png *.svg *.woff *.woff2 *.webp
	}

	encode gzip zstd

	# Handles Recipe Images / Assets
	handle_path /api/media/recipes/* {
		header Access-Control-Allow-Origin * 
                header X-Content-Type-Options nosniff
                header X-Robots-Tag none
                header -X-Frame-Options
                header Accept-Encoding ""
                header Connection $connection_upgrade
                header Upgrade $http_upgrade
                header Host $http_host
                header X-Forwarded-For $proxy_add_x_forwarded_for
                header X-Forwarded-Proto $scheme
                header X-NginX-Proxy true
		header X-External-Path $http_x_ingress_path
                header X-Real-IP $remote_addr
		header @static Cache-Control max-age=31536000
		root * /app/data/recipes/
		file_server
	}

	handle @proxied {
		header Access-Control-Allow-Origin * 
                header X-Content-Type-Options nosniff
                header X-Robots-Tag none
                header -X-Frame-Options
                header Accept-Encoding ""
                header Connection $connection_upgrade
                header Upgrade $http_upgrade
                header Host $http_host
                header X-Forwarded-For $proxy_add_x_forwarded_for
                header X-Forwarded-Proto $scheme
                header X-NginX-Proxy true
                header X-Real-IP $remote_addr
	        header X-External-Path $http_x_ingress_path;
		rewrite * {Referer}{uri}
		reverse_proxy http://127.0.0.1:9000
	}

	handle {
		header Access-Control-Allow-Origin * 
                header X-Content-Type-Options nosniff
                header X-Robots-Tag none
                header -X-Frame-Options
                header Accept-Encoding ""
                header Connection $connection_upgrade
                header Upgrade $http_upgrade
                header Host $http_host
                header X-Forwarded-For $proxy_add_x_forwarded_for
                header X-Forwarded-Proto $scheme
                header X-NginX-Proxy true
                header X-Real-IP $remote_addr
		header X-External-Path $http_x_ingress_path;
		header @static Cache-Control max-age=31536000
		root * /app/dist
		try_files {path}.html {path} /
		file_server
	} 

}
