Skip to content

Commit

Permalink
Merge pull request #19 from indiegogo/cloudinary-staging/adjust-nginx…
Browse files Browse the repository at this point in the history
…-config

cloudinary-staging: Adjust Nginx config, add `q_auto,f_auto`
  • Loading branch information
gogo-mmurphy authored Jun 24, 2024
2 parents 670ce59 + bbaa360 commit a5fe050
Show file tree
Hide file tree
Showing 2 changed files with 13 additions and 4 deletions.
4 changes: 2 additions & 2 deletions charts/cloudinary-staging/Chart.yaml
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
apiVersion: v2
name: cloudinary-staging
version: 0.1.0
description: A Helm chart for Cloudinary
version: 0.1.1
description: A Helm chart for Cloudinary, used by Staging
type: application
keywords:
- cloudinary
Expand Down
13 changes: 11 additions & 2 deletions charts/cloudinary-staging/templates/configmap.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -51,15 +51,24 @@ data:
return 200;
}
# Of interesting note for the next two locations, you can't mix mapped
# variables with default capture variables ($1, $2, etc.) which is why
# these captures are named.
location ~ image/upload {
# Prepend both q_auto & f_auto for Cloudinary hosted assets.
# This allows for either to be overridden by setting the option again later.
rewrite ^(?!q_auto,f_auto.*)(?<prefix>.*?image/upload)/(?<postfix>.*)$ "${prefix}/q_auto,f_auto,${postfix}" break;
try_files /nonexistent @proxy;
}
location ^~ /indiegogo-dev {
# Strip the indiegogo-dev/ prefix
rewrite ^/indiegogo-dev/(.*)$ /$1 last;
}
location ~ f_auto {
# Replace f_auto with appropriate setting based on Accept headers.
# Of interesting note, you can't mix mapped variables with default capture
# variables ($1, $2, etc.) which is why these captures are named.
rewrite ^(?<prefix>.*)f_auto(?<postfix>.*)$ "${prefix}${f_auto_setting}${postfix}" break;
try_files /nonexistent @proxy;
}
Expand Down

0 comments on commit a5fe050

Please sign in to comment.