Created
April 13, 2024 15:22
-
-
Save bxb100/7850be3f0b868243be6d6874ce34ff72 to your computer and use it in GitHub Desktop.
Revisions
-
bxb100 created this gist
Apr 13, 2024 .There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode charactersOriginal file line number Diff line number Diff line change @@ -0,0 +1,41 @@ {$dify_host_name} { header { # Enable HTTP Strict Transport Security (HSTS) to force clients to always connect via HTTPS Strict-Transport-Security "max-age=31536000; includeSubDomains; preload" # Prevent some browsers from MIME-sniffing a response away from the declared Content-Type X-Content-Type-Options "nosniff" # X-Robots-Tag X-Robots-Tag "noindex, noarchive, nofollow" # Remove Server header -Server } @api { path /console/api path /api path /v1 path /files } handle @api { reverse_proxy :5001 { header_up X-Forwarded-Port {http.request.port} header_up X-Forwarded-Proto {http.request.scheme} header_up X-Real-IP {remote_host} } } handle { # proxy_pass http://web:3000; reverse_proxy :3000 { header_up X-Forwarded-Port {http.request.port} header_up X-Forwarded-Proto {http.request.scheme} header_up X-Real-IP {remote_host} } } }