Skip to content

Instantly share code, notes, and snippets.

@pmoncadaisla
Created November 10, 2021 11:39
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save pmoncadaisla/0f115e0b75e16c9d0fb3353312122833 to your computer and use it in GitHub Desktop.
Save pmoncadaisla/0f115e0b75e16c9d0fb3353312122833 to your computer and use it in GitHub Desktop.
Nginx default.conf split
log_format upstreamlog '{"nginx_time": "$time_local", "newfmc_enabled": "$newfmc", "featureflag_enabled": "$postpaid", "featureflag_fmc_enabled": "$newfmc",, "remote_addr": "$http_x_real_ip", "x-forwarded-for": "$proxy_add_x_forwarded_for", "request_id": "$request_id", "remote_user": "$remote_user", "bytes_sent": $bytes_sent, "request_time": $request_time, "status": $status, "vhost": "$host", "request_proto": "$server_protocol", "path": "$uri", "request_query": "$args", "request_length": $request_length, "duration": $request_time, "method": "$request_method", "scheme": "$scheme", "http_referrer": "$http_referer", "http_user_agent": "$http_user_agent"}';
access_log /dev/stdout upstreamlog;
# Split clients by the following percentages
# according to remote IP and user agent
split_clients "seedString${http_x_real_ip}" $postpaid_variant {
50% true;
50% true; # All true
}
map $cookie_featureflag $postpaid {
default $postpaid_variant; #no cookie present use result of split_clients
true true; #use cookie value
false false; #use cookie value
}
# Split clients for new fmc
#
split_clients "seedString${http_x_real_ip}-otro" $newfmc_split {
50% true;
50% true;
}
map $http_referrer $corsheader {
default "$http_origin";
"~*^http(s?:\/\/[^\/]+).*$" "http$1";
}
map $cookie_newfmc $newfmc {
default $newfmc_split;
true true;
false false;
}
# Split clients for appointments
#
split_clients "seedString${http_x_real_ip}-otro" $appointments_split {
50% false;
50% false;
}
map $cookie_appointments $appointments {
default $appointments_split;
true true;
false false;
}
# Split clients for newproductdetails
#
split_clients "seedString${http_x_real_ip}-otro" $newproductdetails_split {
50% true;
50% true;
}
map $cookie_newproductdetails $newproductdetails {
default $newproductdetails_split;
true true;
false false;
}
# Split clients for skyBanner
#
split_clients "seedString${http_x_real_ip}-otro" $skyBanner_split {
50% true;
50% true;
}
map $cookie_skyBanner $skyBanner {
default $skyBanner_split;
true true;
false false;
}
# Split clients for promoCoverage
#
split_clients "seedString${http_x_real_ip}-otro" $promoCoverage_split {
50% false;
50% false;
}
map $cookie_promoCoverage $promoCoverage {
default $promoCoverage_split;
true true;
false false;
}
# Split clients for removeNetflixPromo
#
split_clients "seedString${http_x_real_ip}-otro" $removeNetflixPromo_split {
50% true;
50% true;
}
map $cookie_promoCoverage $removeNetflixPromo {
default $removeNetflixPromo_split;
true true;
false false;
}
# Split clients for blackfriday
#
split_clients "seedString${http_x_real_ip}-blackfriday" $blackfriday_split {
50% false;
50% false;
}
map $cookie_blackfriday $blackfriday {
default $blackfriday_split;
true true;
false false;
}
# Split clients for coveragegescal
#
split_clients "seedString${http_x_real_ip}-gescal" $coveragegescal_split {
50% true;
50% true;
}
map $cookie_coveragegescal $coveragegescal {
default $coveragegescal_split;
true true;
false false;
}
# Split clients for noPermanence
#
split_clients "seedString${http_x_real_ip}-otro" $noPermanence_split {
50% false;
50% false;
}
map $cookie_noPermanence $noPermanence {
default $noPermanence_split;
true true;
false false;
}
# Split clients for hideDuoFreeInSoho
#
split_clients "seedString${http_x_real_ip}-otro" $hideDuoFreeInSoho_split {
50% false;
50% false;
}
map $cookie_hideDuoFreeInSoho $hideDuoFreeInSoho {
default $hideDuoFreeInSoho_split;
true true;
false false;
}
# Split clients for netflix
#
split_clients "seedString${http_x_real_ip}-otro" $netflix_split {
50% true;
50% true;
}
map $cookie_netflix $netflix {
default $netflix_split;
true true;
false false;
}
# Split clients for backToSchool
#
split_clients "seedString${http_x_real_ip}-otro" $backToSchool_split {
50% true;
50% true;
}
map $cookie_backToSchool $backToSchool {
default $backToSchool_split;
true true;
false false;
}
# Split clients for countdownInfoBanner
#
split_clients "seedString${http_x_real_ip}-otro" $countdownInfoBanner_split {
50% true;
50% true;
}
map $cookie_countdownInfoBanner $countdownInfoBanner {
default $countdownInfoBanner_split;
true true;
false false;
}
# Split clients for nperf
#
split_clients "seedString${http_x_real_ip}-otro" $nperf_split {
50% true;
50% true;
}
map $cookie_nperf $nperf {
default $nperf_split;
true true;
false false;
}
# Split clients for secondaryMobileCTA
#
split_clients "seedString${http_x_real_ip}-otro" $secondaryMobileCTA_split {
50% true;
50% true;
}
map $cookie_secondaryMobileCTA $secondaryMobileCTA {
default $secondaryMobileCTA_split;
true true;
false false;
}
# Split clients for checkoutv3
#
split_clients "seedString${http_x_real_ip}-otro" $checkoutv3_split {
50% true;
50% true;
}
map $cookie_checkoutv3 $checkoutv3 {
default $checkoutv3_split;
true true;
false false;
}
# Split clients for tariffCardsResidential
#
split_clients "seedString${http_x_real_ip}-otro" $tariffCardsResidential_split {
50% true;
50% true;
}
map $cookie_tariffCardsResidential $tariffCardsResidential {
default $tariffCardsResidential_split;
true true;
false false;
}
# Split clients for whyYoigo
#
split_clients "seedString${http_x_real_ip}-otro" $whyYoigo_split {
50% true;
50% true;
}
map $cookie_whyYoigo $whyYoigo {
default $whyYoigo_split;
true true;
false false;
}
# Split clients for yoigoFixed
#
split_clients "seedString${http_x_real_ip}-otro" $yoigoFixed_split {
50% true;
50% true;
}
map $cookie_yoigoFixed $yoigoFixed {
default $yoigoFixed_split;
true true;
false false;
}
# Split clients for checkoutPrepaid
#
split_clients "seedString${http_x_real_ip}-otro" $checkoutPrepaid_split {
50% true;
50% true;
}
map $cookie_checkoutPrepaid $checkoutPrepaid {
default $checkoutPrepaid_split;
true true;
false false;
}
# Split clients for coronavirus
#
split_clients "seedString${http_x_real_ip}-otro" $coronavirus_split {
50% false;
50% false;
}
map $cookie_coronavirus $coronavirus {
default $coronavirus_split;
true true;
false false;
}
# Split clients for recoverCheckout
#
split_clients "seedString${http_x_real_ip}-otro" $recoverCheckout_split {
50% false;
50% false;
}
map $cookie_recoverCheckout $recoverCheckout {
default $recoverCheckout_split;
true true;
false false;
}
# Split clients for coronavirusFijo
#
split_clients "seedString${http_x_real_ip}-otro" $coronavirusFijo_split {
50% false;
50% false;
}
map $cookie_coronavirusFijo $coronavirusFijo {
default $coronavirusFijo_split;
true true;
false false;
}
# Split clients for coveragev3
#
split_clients "seedString${http_x_real_ip}-otro" $coveragev3_split {
50% true;
50% true;
}
map $cookie_coveragev3 $coveragev3 {
default $coveragev3_split;
true true;
false false;
}
# Split clients for catalogV3
#
split_clients "seedString${http_x_real_ip}-otro" $catalogV3_split {
50% true;
50% true;
}
map $cookie_catalogV3 $catalogV3 {
default $catalogV3_split;
true true;
false false;
}
# Split clients for energyGo
#
split_clients "seedString${http_x_real_ip}-otro" $energyGo_split {
50% true;
50% true;
}
map $cookie_energyGo $energyGo {
default $energyGo_split;
true true;
false false;
}
# Split clients for energyGoSoho
#
split_clients "seedString${http_x_real_ip}-otro" $energyGoSoho_split {
50% true;
50% true;
}
map $cookie_energyGoSoho $energyGoSoho {
default $energyGoSoho_split;
true true;
false false;
}
# Split clients for appleTV
#
split_clients "seedString${http_x_real_ip}-otro" $appleTV_split {
50% true;
50% true;
}
map $cookie_appleTV $appleTV {
default $appleTV_split;
true true;
false false;
}
# Split clients for newOperators
#
split_clients "seedString${http_x_real_ip}-otro" $newOperators_split {
50% true;
50% true;
}
map $cookie_newOperators $newOperators {
default $newOperators_split;
true true;
false false;
}
# Split clients for configuratorV2
#
split_clients "seedString${http_x_real_ip}-otro" $configuratorV2_split {
50% true;
50% true;
}
map $cookie_configuratorV2 $configuratorV2 {
default $configuratorV2_split;
true true;
false false;
}
# Split clients for preocupateCero
#
split_clients "seedString${http_x_real_ip}-otro" $preocupateCero_split {
50% true;
50% true;
}
map $cookie_preocupateCero $preocupateCero {
default $preocupateCero_split;
true true;
false false;
}
server {
listen 80;
server_name $host;
gzip on;
gzip_types text/plain application/xml;
gzip_proxied no-cache no-store private expired auth;
gzip_min_length 300;
location /postpaid {
default_type application/json;
add_header Access-Control-Allow-Origin "$corsheader";
add_header Access-Control-Allow-Headers "DNT,X-CustomHeader,Keep-Alive,User-Agent,X-Requested-With,If-Modified-Since,Cache-Control,Content-Type,Authorization,Cookie,Content-Encoding,Customer-Session-ID,withCredentials";
add_header Access-Control-Allow-Credentials "true";
add_header Access-Control-Allow-Methods "GET";
return 200 '{ "response": "${postpaid}" }';
}
location /postpaid/true {
add_header Set-Cookie "featureflag=true; Max-Age=3600";
default_type application/json;
return 200 '{ "response": "true" }';
}
location /postpaid/false {
add_header Set-Cookie "featureflag=false; Max-Age=3600";
default_type application/json;
return 200 '{ "response": "false" }';
}
location /fmc {
default_type application/json;
add_header Access-Control-Allow-Origin "$corsheader";
add_header Access-Control-Allow-Headers "DNT,X-CustomHeader,Keep-Alive,User-Agent,X-Requested-With,If-Modified-Since,Cache-Control,Content-Type,Authorization,Cookie,Content-Encoding,Customer-Session-ID,withCredentials";
add_header Access-Control-Allow-Credentials "true";
add_header Access-Control-Allow-Methods "GET";
return 200 '{ "response": "${newfmc}" }';
}
location /fmc/true {
add_header Set-Cookie "newfmc=true; Max-Age=3600";
default_type application/json;
return 200 '{ "response": "true" }';
}
location /fmc/false {
add_header Set-Cookie "newfmc=false; Max-Age=3600";
default_type application/json;
return 200 '{ "response": "false" }';
}
location /appointments {
default_type application/json;
add_header Access-Control-Allow-Origin "$corsheader";
add_header Access-Control-Allow-Headers "DNT,X-CustomHeader,Keep-Alive,User-Agent,X-Requested-With,If-Modified-Since,Cache-Control,Content-Type,Authorization,Cookie,Content-Encoding,Customer-Session-ID,withCredentials";
add_header Access-Control-Allow-Credentials "true";
add_header Access-Control-Allow-Methods "GET";
return 200 '{ "activated": "${appointments}" }';
}
location /appointments/true {
add_header Set-Cookie "appointments=true; Max-Age=3600";
default_type application/json;
return 200 '{ "activated": "true" }';
}
location /appointments/false {
add_header Set-Cookie "appointments=false; Max-Age=3600";
default_type application/json;
return 200 '{ "activated": "false" }';
}
location /newproductdetails {
default_type application/json;
add_header Access-Control-Allow-Origin "$corsheader";
add_header Access-Control-Allow-Headers "DNT,X-CustomHeader,Keep-Alive,User-Agent,X-Requested-With,If-Modified-Since,Cache-Control,Content-Type,Authorization,Cookie,Content-Encoding,Customer-Session-ID,withCredentials";
add_header Access-Control-Allow-Credentials "true";
add_header Access-Control-Allow-Methods "GET";
return 200 '{ "activated": "${newproductdetails}" }';
}
location /newproductdetails/true {
add_header Set-Cookie "newproductdetails=true; Max-Age=3600";
default_type application/json;
return 200 '{ "activated": "true" }';
}
location /newproductdetails/false {
add_header Set-Cookie "newproductdetails=false; Max-Age=3600";
default_type application/json;
return 200 '{ "activated": "false" }';
}
# Sky Banner
location /skyBanner {
default_type application/json;
add_header Access-Control-Allow-Origin "$corsheader";
add_header Access-Control-Allow-Headers "DNT,X-CustomHeader,Keep-Alive,User-Agent,X-Requested-With,If-Modified-Since,Cache-Control,Content-Type,Authorization,Cookie,Content-Encoding,Customer-Session-ID,withCredentials";
add_header Access-Control-Allow-Credentials "true";
add_header Access-Control-Allow-Methods "GET";
return 200 '{ "activated": "${skyBanner}" }';
}
location /skyBanner/true {
add_header Set-Cookie "skyBanner=true; Max-Age=3600";
default_type application/json;
return 200 '{ "activated": "true" }';
}
location /skyBanner/false {
add_header Set-Cookie "skyBanner=false; Max-Age=3600";
default_type application/json;
return 200 '{ "activated": "false" }';
}
# promoCoverage
location /promocoverage {
default_type application/json;
add_header Access-Control-Allow-Origin "$corsheader";
add_header Access-Control-Allow-Headers "DNT,X-CustomHeader,Keep-Alive,User-Agent,X-Requested-With,If-Modified-Since,Cache-Control,Content-Type,Authorization,Cookie,Content-Encoding,Customer-Session-ID,withCredentials";
add_header Access-Control-Allow-Credentials "true";
add_header Access-Control-Allow-Methods "GET";
return 200 '{ "activated": "${promoCoverage}" }';
}
location /promoCoverage {
default_type application/json;
add_header Access-Control-Allow-Origin "$corsheader";
add_header Access-Control-Allow-Headers "DNT,X-CustomHeader,Keep-Alive,User-Agent,X-Requested-With,If-Modified-Since,Cache-Control,Content-Type,Authorization,Cookie,Content-Encoding,Customer-Session-ID,withCredentials";
add_header Access-Control-Allow-Credentials "true";
add_header Access-Control-Allow-Methods "GET";
return 301 /promocoverage;
}
location /promocoverage/true {
add_header Set-Cookie "promoCoverage=true; Max-Age=3600";
default_type application/json;
return 200 '{ "activated": "true" }';
}
location /promocoverage/false {
add_header Set-Cookie "promoCoverage=false; Max-Age=3600";
default_type application/json;
return 200 '{ "activated": "false" }';
}
# removeNetflixPromo
location /removeNetflixPromo {
default_type application/json;
add_header Access-Control-Allow-Origin "$corsheader";
add_header Access-Control-Allow-Headers "DNT,X-CustomHeader,Keep-Alive,User-Agent,X-Requested-With,If-Modified-Since,Cache-Control,Content-Type,Authorization,Cookie,Content-Encoding,Customer-Session-ID,withCredentials";
add_header Access-Control-Allow-Credentials "true";
add_header Access-Control-Allow-Methods "GET";
return 200 '{ "activated": "${removeNetflixPromo}" }';
}
location /removeNetflixPromo/true {
add_header Set-Cookie "removeNetflixPromo=true; Max-Age=3600";
default_type application/json;
return 200 '{ "activated": "true" }';
}
location /removeNetflixPromo/false {
add_header Set-Cookie "removeNetflixPromo=false; Max-Age=3600";
default_type application/json;
return 200 '{ "activated": "false" }';
}
location /blackFriday {
default_type application/json;
add_header Access-Control-Allow-Origin "$corsheader";
add_header Access-Control-Allow-Headers "DNT,X-CustomHeader,Keep-Alive,User-Agent,X-Requested-With,If-Modified-Since,Cache-Control,Content-Type,Authorization,Cookie,Content-Encoding,Customer-Session-ID,withCredentials";
add_header Access-Control-Allow-Credentials "true";
add_header Access-Control-Allow-Methods "GET";
return 301 /blackfriday;
}
location /blackfriday {
default_type application/json;
add_header Access-Control-Allow-Origin "$corsheader";
add_header Access-Control-Allow-Headers "DNT,X-CustomHeader,Keep-Alive,User-Agent,X-Requested-With,If-Modified-Since,Cache-Control,Content-Type,Authorization,Cookie,Content-Encoding,Customer-Session-ID,withCredentials";
add_header Access-Control-Allow-Credentials "true";
add_header Access-Control-Allow-Methods "GET";
return 200 '{"activated": "${blackfriday}"}';
}
location /blackfriday/true {
add_header Set-Cookie "blackfriday=true; Max-Age=3600";
default_type application/json;
return 200 '{ "activated": "true" }';
}
location /blackfriday/false {
add_header Set-Cookie "blackfriday=false; Max-Age=3600";
default_type application/json;
return 200 '{ "activated": "false" }';
}
location /coveragegescal {
default_type application/json;
add_header Access-Control-Allow-Origin "$corsheader";
add_header Access-Control-Allow-Headers "DNT,X-CustomHeader,Keep-Alive,User-Agent,X-Requested-With,If-Modified-Since,Cache-Control,Content-Type,Authorization,Cookie,Content-Encoding,Customer-Session-ID,withCredentials";
add_header Access-Control-Allow-Credentials "true";
add_header Access-Control-Allow-Methods "GET";
return 200 '{ "activated": "${coveragegescal}" }';
}
location /coveragegescal/true {
add_header Set-Cookie "coveragegescal=true; Max-Age=3600";
default_type application/json;
return 200 '{ "activated": "true" }';
}
location /coveragegescal/false {
add_header Set-Cookie "coveragegescal=false; Max-Age=3600";
default_type application/json;
return 200 '{ "activated": "false" }';
}
location /noPermanence {
default_type application/json;
add_header Access-Control-Allow-Origin "$corsheader";
add_header Access-Control-Allow-Headers "DNT,X-CustomHeader,Keep-Alive,User-Agent,X-Requested-With,If-Modified-Since,Cache-Control,Content-Type,Authorization,Cookie,Content-Encoding,Customer-Session-ID,withCredentials";
add_header Access-Control-Allow-Credentials "true";
add_header Access-Control-Allow-Methods "GET";
return 200 '{ "activated": "${noPermanence}" }';
}
location /noPermanence/true {
add_header Set-Cookie "noPermanence=true; Max-Age=3600";
default_type application/json;
return 200 '{ "activated": "true" }';
}
location /noPermanence/false {
add_header Set-Cookie "noPermanence=false; Max-Age=3600";
default_type application/json;
return 200 '{ "activated": "false" }';
}
location /hideDuoFreeInSoho {
default_type application/json;
add_header Access-Control-Allow-Origin "$corsheader";
add_header Access-Control-Allow-Headers "DNT,X-CustomHeader,Keep-Alive,User-Agent,X-Requested-With,If-Modified-Since,Cache-Control,Content-Type,Authorization,Cookie,Content-Encoding,Customer-Session-ID,withCredentials";
add_header Access-Control-Allow-Credentials "true";
add_header Access-Control-Allow-Methods "GET";
return 200 '{ "activated": "${hideDuoFreeInSoho}" }';
}
location /hideDuoFreeInSoho/true {
add_header Set-Cookie "hideDuoFreeInSoho=true; Max-Age=3600";
default_type application/json;
return 200 '{ "activated": "true" }';
}
location /hideDuoFreeInSoho/false {
add_header Set-Cookie "hideDuoFreeInSoho=false; Max-Age=3600";
default_type application/json;
return 200 '{ "activated": "false" }';
}
location /netflix {
default_type application/json;
add_header Access-Control-Allow-Origin "$corsheader";
add_header Access-Control-Allow-Headers "DNT,X-CustomHeader,Keep-Alive,User-Agent,X-Requested-With,If-Modified-Since,Cache-Control,Content-Type,Authorization,Cookie,Content-Encoding,Customer-Session-ID,withCredentials";
add_header Access-Control-Allow-Credentials "true";
add_header Access-Control-Allow-Methods "GET";
return 200 '{ "activated": "${netflix}" }';
}
location /netflix/true {
add_header Set-Cookie "netflix=true; Max-Age=3600";
default_type application/json;
return 200 '{ "activated": "true" }';
}
location /netflix/false {
add_header Set-Cookie "netflix=false; Max-Age=3600";
default_type application/json;
return 200 '{ "activated": "false" }';
}
location /backToSchool {
default_type application/json;
add_header Access-Control-Allow-Origin "$corsheader";
add_header Access-Control-Allow-Headers "DNT,X-CustomHeader,Keep-Alive,User-Agent,X-Requested-With,If-Modified-Since,Cache-Control,Content-Type,Authorization,Cookie,Content-Encoding,Customer-Session-ID,withCredentials";
add_header Access-Control-Allow-Credentials "true";
add_header Access-Control-Allow-Methods "GET";
return 200 '{ "activated": "${backToSchool}" }';
}
location /backToSchool/true {
add_header Set-Cookie "backToSchool=true; Max-Age=3600";
default_type application/json;
return 200 '{ "activated": "true" }';
}
location /backToSchool/false {
add_header Set-Cookie "backToSchool=false; Max-Age=3600";
default_type application/json;
return 200 '{ "activated": "false" }';
}
location /countdownInfoBanner {
default_type application/json;
add_header Access-Control-Allow-Origin "$corsheader";
add_header Access-Control-Allow-Headers "DNT,X-CustomHeader,Keep-Alive,User-Agent,X-Requested-With,If-Modified-Since,Cache-Control,Content-Type,Authorization,Cookie,Content-Encoding,Customer-Session-ID,withCredentials";
add_header Access-Control-Allow-Credentials "true";
add_header Access-Control-Allow-Methods "GET";
return 200 '{ "activated": "${countdownInfoBanner}" }';
}
location /countdownInfoBanner/true {
add_header Set-Cookie "countdownInfoBanner=true; Max-Age=3600";
default_type application/json;
return 200 '{ "activated": "true" }';
}
location /countdownInfoBanner/false {
add_header Set-Cookie "countdownInfoBanner=false; Max-Age=3600";
default_type application/json;
return 200 '{ "activated": "false" }';
}
location /nperf {
default_type application/json;
add_header Access-Control-Allow-Origin "$corsheader";
add_header Access-Control-Allow-Headers "DNT,X-CustomHeader,Keep-Alive,User-Agent,X-Requested-With,If-Modified-Since,Cache-Control,Content-Type,Authorization,Cookie,Content-Encoding,Customer-Session-ID,withCredentials";
add_header Access-Control-Allow-Credentials "true";
add_header Access-Control-Allow-Methods "GET";
return 200 '{ "activated": "${nperf}" }';
}
location /nperf/true {
add_header Set-Cookie "nperf=true; Max-Age=3600";
default_type application/json;
return 200 '{ "activated": "true" }';
}
location /nperf/false {
add_header Set-Cookie "nperf=false; Max-Age=3600";
default_type application/json;
return 200 '{ "activated": "false" }';
}
location /secondaryMobileCTA {
default_type application/json;
add_header Access-Control-Allow-Origin "$corsheader";
add_header Access-Control-Allow-Headers "DNT,X-CustomHeader,Keep-Alive,User-Agent,X-Requested-With,If-Modified-Since,Cache-Control,Content-Type,Authorization,Cookie,Content-Encoding,Customer-Session-ID,withCredentials";
add_header Access-Control-Allow-Credentials "true";
add_header Access-Control-Allow-Methods "GET";
return 200 '{ "activated": "${secondaryMobileCTA}" }';
}
location /secondaryMobileCTA/true {
add_header Set-Cookie "secondaryMobileCTA=true; Max-Age=3600";
default_type application/json;
return 200 '{ "activated": "true" }';
}
location /secondaryMobileCTA/false {
add_header Set-Cookie "secondaryMobileCTA=false; Max-Age=3600";
default_type application/json;
return 200 '{ "activated": "false" }';
}
location /checkoutv3 {
default_type application/json;
add_header Access-Control-Allow-Origin "$corsheader";
add_header Access-Control-Allow-Headers "DNT,X-CustomHeader,Keep-Alive,User-Agent,X-Requested-With,If-Modified-Since,Cache-Control,Content-Type,Authorization,Cookie,Content-Encoding,Customer-Session-ID,withCredentials";
add_header Access-Control-Allow-Credentials "true";
add_header Access-Control-Allow-Methods "GET";
return 200 '{ "activated": "${checkoutv3}" }';
}
location /checkoutv3/true {
add_header Set-Cookie "checkoutv3=true; Max-Age=3600";
default_type application/json;
return 200 '{ "activated": "true" }';
}
location /checkoutv3/false {
add_header Set-Cookie "checkoutv3=false; Max-Age=3600";
default_type application/json;
return 200 '{ "activated": "false" }';
}
location /tariffCardsResidential {
default_type application/json;
add_header Access-Control-Allow-Origin "$corsheader";
add_header Access-Control-Allow-Headers "DNT,X-CustomHeader,Keep-Alive,User-Agent,X-Requested-With,If-Modified-Since,Cache-Control,Content-Type,Authorization,Cookie,Content-Encoding,Customer-Session-ID,withCredentials";
add_header Access-Control-Allow-Credentials "true";
add_header Access-Control-Allow-Methods "GET";
return 200 '{ "activated": "${tariffCardsResidential}" }';
}
location /tariffCardsResidential/true {
add_header Set-Cookie "tariffCardsResidential=true; Max-Age=3600";
default_type application/json;
return 200 '{ "activated": "true" }';
}
location /tariffCardsResidential/false {
add_header Set-Cookie "tariffCardsResidential=false; Max-Age=3600";
default_type application/json;
return 200 '{ "activated": "false" }';
}
location /whyYoigo {
default_type application/json;
add_header Access-Control-Allow-Origin "$corsheader";
add_header Access-Control-Allow-Headers "DNT,X-CustomHeader,Keep-Alive,User-Agent,X-Requested-With,If-Modified-Since,Cache-Control,Content-Type,Authorization,Cookie,Content-Encoding,Customer-Session-ID,withCredentials";
add_header Access-Control-Allow-Credentials "true";
add_header Access-Control-Allow-Methods "GET";
return 200 '{ "activated": "${whyYoigo}" }';
}
location /whyYoigo/true {
add_header Set-Cookie "whyYoigo=true; Max-Age=3600";
default_type application/json;
return 200 '{ "activated": "true" }';
}
location /whyYoigo/false {
add_header Set-Cookie "whyYoigo=false; Max-Age=3600";
default_type application/json;
return 200 '{ "activated": "false" }';
}
location / {
default_type application/json;
return 200 '{"status": "ko"}';
}
location /yoigoFixed {
default_type application/json;
add_header Access-Control-Allow-Origin "$corsheader";
add_header Access-Control-Allow-Headers "DNT,X-CustomHeader,Keep-Alive,User-Agent,X-Requested-With,If-Modified-Since,Cache-Control,Content-Type,Authorization,Cookie,Content-Encoding,Customer-Session-ID,withCredentials";
add_header Access-Control-Allow-Credentials "true";
add_header Access-Control-Allow-Methods "GET";
return 200 '{ "activated": "${yoigoFixed}" }';
}
location /yoigoFixed/true {
add_header Set-Cookie "yoigoFixed=true; Max-Age=3600";
default_type application/json;
return 200 '{ "activated": "true" }';
}
location /yoigoFixed/false {
add_header Set-Cookie "yoigoFixed=false; Max-Age=3600";
default_type application/json;
return 200 '{ "activated": "false" }';
}
location /checkoutPrepaid {
default_type application/json;
add_header Access-Control-Allow-Origin "$corsheader";
add_header Access-Control-Allow-Headers "DNT,X-CustomHeader,Keep-Alive,User-Agent,X-Requested-With,If-Modified-Since,Cache-Control,Content-Type,Authorization,Cookie,Content-Encoding,Customer-Session-ID,withCredentials";
add_header Access-Control-Allow-Credentials "true";
add_header Access-Control-Allow-Methods "GET";
return 200 '{ "activated": "${checkoutPrepaid}" }';
}
location /checkoutPrepaid/true {
add_header Set-Cookie "checkoutPrepaid=true; Max-Age=3600";
default_type application/json;
return 200 '{ "activated": "true" }';
}
location /checkoutPrepaid/false {
add_header Set-Cookie "checkoutPrepaid=false; Max-Age=3600";
default_type application/json;
return 200 '{ "activated": "false" }';
}
location /coronavirus {
default_type application/json;
add_header Access-Control-Allow-Origin "$corsheader";
add_header Access-Control-Allow-Headers "DNT,X-CustomHeader,Keep-Alive,User-Agent,X-Requested-With,If-Modified-Since,Cache-Control,Content-Type,Authorization,Cookie,Content-Encoding,Customer-Session-ID,withCredentials";
add_header Access-Control-Allow-Credentials "true";
add_header Access-Control-Allow-Methods "GET";
return 200 '{ "activated": "${coronavirus}" }';
}
location /coronavirus/true {
add_header Set-Cookie "coronavirus=true; Max-Age=3600";
default_type application/json;
return 200 '{ "activated": "true" }';
}
location /coronavirus/false {
add_header Set-Cookie "coronavirus=false; Max-Age=3600";
default_type application/json;
return 200 '{ "activated": "false" }';
}
location /recoverCheckout {
default_type application/json;
add_header Access-Control-Allow-Origin "$corsheader";
add_header Access-Control-Allow-Headers "DNT,X-CustomHeader,Keep-Alive,User-Agent,X-Requested-With,If-Modified-Since,Cache-Control,Content-Type,Authorization,Cookie,Content-Encoding,Customer-Session-ID,withCredentials";
add_header Access-Control-Allow-Credentials "true";
add_header Access-Control-Allow-Methods "GET";
return 200 '{ "activated": "${recoverCheckout}" }';
}
location /recoverCheckout/true {
add_header Set-Cookie "recoverCheckout=true; Max-Age=3600";
default_type application/json;
return 200 '{ "activated": "true" }';
}
location /recoverCheckout/false {
add_header Set-Cookie "recoverCheckout=false; Max-Age=3600";
default_type application/json;
return 200 '{ "activated": "false" }';
}
location /coronavirusFijo {
default_type application/json;
add_header Access-Control-Allow-Origin "$corsheader";
add_header Access-Control-Allow-Headers "DNT,X-CustomHeader,Keep-Alive,User-Agent,X-Requested-With,If-Modified-Since,Cache-Control,Content-Type,Authorization,Cookie,Content-Encoding,Customer-Session-ID,withCredentials";
add_header Access-Control-Allow-Credentials "true";
add_header Access-Control-Allow-Methods "GET";
return 200 '{ "activated": "${coronavirusFijo}" }';
}
location /coronavirusFijo/true {
add_header Set-Cookie "coronavirusFijo=true; Max-Age=3600";
default_type application/json;
return 200 '{ "activated": "true" }';
}
location /coronavirusFijo/false {
add_header Set-Cookie "coronavirusFijo=false; Max-Age=3600";
default_type application/json;
return 200 '{ "activated": "false" }';
}
location /coveragev3 {
default_type application/json;
add_header Access-Control-Allow-Origin "$corsheader";
add_header Access-Control-Allow-Headers "DNT,X-CustomHeader,Keep-Alive,User-Agent,X-Requested-With,If-Modified-Since,Cache-Control,Content-Type,Authorization,Cookie,Content-Encoding,Customer-Session-ID,withCredentials";
add_header Access-Control-Allow-Credentials "true";
add_header Access-Control-Allow-Methods "GET";
return 200 '{ "activated": "${coveragev3}" }';
}
location /coveragev3/true {
add_header Set-Cookie "coveragev3=true; Max-Age=3600";
default_type application/json;
return 200 '{ "activated": "true" }';
}
location /coveragev3/false {
add_header Set-Cookie "coveragev3=false; Max-Age=3600";
default_type application/json;
return 200 '{ "activated": "false" }';
}
location /catalogV3 {
default_type application/json;
add_header Access-Control-Allow-Origin "$corsheader";
add_header Access-Control-Allow-Headers "DNT,X-CustomHeader,Keep-Alive,User-Agent,X-Requested-With,If-Modified-Since,Cache-Control,Content-Type,Authorization,Cookie,Content-Encoding,Customer-Session-ID,withCredentials";
add_header Access-Control-Allow-Credentials "true";
add_header Access-Control-Allow-Methods "GET";
return 200 '{ "activated": "${catalogV3}" }';
}
location /catalogV3/true {
add_header Set-Cookie "catalogV3=true; Max-Age=3600";
default_type application/json;
return 200 '{ "activated": "true" }';
}
location /catalogV3/false {
add_header Set-Cookie "catalogV3=false; Max-Age=3600";
default_type application/json;
return 200 '{ "activated": "false" }';
}
location /energyGo {
default_type application/json;
add_header Access-Control-Allow-Origin "$corsheader";
add_header Access-Control-Allow-Headers "DNT,X-CustomHeader,Keep-Alive,User-Agent,X-Requested-With,If-Modified-Since,Cache-Control,Content-Type,Authorization,Cookie,Content-Encoding,Customer-Session-ID,withCredentials";
add_header Access-Control-Allow-Credentials "true";
add_header Access-Control-Allow-Methods "GET";
return 200 '{ "activated": "${energyGo}" }';
}
location /energyGo/true {
add_header Set-Cookie "energyGo=true; Max-Age=3600";
default_type application/json;
return 200 '{ "activated": "true" }';
}
location /energyGo/false {
add_header Set-Cookie "energyGo=false; Max-Age=3600";
default_type application/json;
return 200 '{ "activated": "false" }';
}
location /energyGoSoho {
default_type application/json;
add_header Access-Control-Allow-Origin "$corsheader";
add_header Access-Control-Allow-Headers "DNT,X-CustomHeader,Keep-Alive,User-Agent,X-Requested-With,If-Modified-Since,Cache-Control,Content-Type,Authorization,Cookie,Content-Encoding,Customer-Session-ID,withCredentials";
add_header Access-Control-Allow-Credentials "true";
add_header Access-Control-Allow-Methods "GET";
return 200 '{ "activated": "${energyGoSoho}" }';
}
location /energyGoSoho/true {
add_header Set-Cookie "energyGoSoho=true; Max-Age=3600";
default_type application/json;
return 200 '{ "activated": "true" }';
}
location /energyGoSoho/false {
add_header Set-Cookie "energyGoSoho=false; Max-Age=3600";
default_type application/json;
return 200 '{ "activated": "false" }';
}
location /appleTV {
default_type application/json;
add_header Access-Control-Allow-Origin "$corsheader";
add_header Access-Control-Allow-Headers "DNT,X-CustomHeader,Keep-Alive,User-Agent,X-Requested-With,If-Modified-Since,Cache-Control,Content-Type,Authorization,Cookie,Content-Encoding,Customer-Session-ID,withCredentials";
add_header Access-Control-Allow-Credentials "true";
add_header Access-Control-Allow-Methods "GET";
return 200 '{ "activated": "${appleTV}" }';
}
location /appleTV/true {
add_header Set-Cookie "appleTV=true; Max-Age=3600";
default_type application/json;
return 200 '{ "activated": "true" }';
}
location /appleTV/false {
add_header Set-Cookie "appleTV=false; Max-Age=3600";
default_type application/json;
return 200 '{ "activated": "false" }';
}
location /newOperators {
default_type application/json;
add_header Access-Control-Allow-Origin "$corsheader";
add_header Access-Control-Allow-Headers "DNT,X-CustomHeader,Keep-Alive,User-Agent,X-Requested-With,If-Modified-Since,Cache-Control,Content-Type,Authorization,Cookie,Content-Encoding,Customer-Session-ID,withCredentials";
add_header Access-Control-Allow-Credentials "true";
add_header Access-Control-Allow-Methods "GET";
return 200 '{ "activated": "${newOperators}" }';
}
location /newOperators/true {
add_header Set-Cookie "newOperators=true; Max-Age=3600";
default_type application/json;
return 200 '{ "activated": "true" }';
}
location /newOperators/false {
add_header Set-Cookie "newOperators=false; Max-Age=3600";
default_type application/json;
return 200 '{ "activated": "false" }';
}
location /configuratorV2 {
default_type application/json;
add_header Access-Control-Allow-Origin "$corsheader";
add_header Access-Control-Allow-Headers "DNT,X-CustomHeader,Keep-Alive,User-Agent,X-Requested-With,If-Modified-Since,Cache-Control,Content-Type,Authorization,Cookie,Content-Encoding,Customer-Session-ID,withCredentials";
add_header Access-Control-Allow-Credentials "true";
add_header Access-Control-Allow-Methods "GET";
return 200 '{ "activated": "${configuratorV2}" }';
}
location /configuratorV2/true {
add_header Set-Cookie "configuratorV2=true; Max-Age=3600";
default_type application/json;
return 200 '{ "activated": "true" }';
}
location /configuratorV2/false {
add_header Set-Cookie "configuratorV2=false; Max-Age=3600";
default_type application/json;
return 200 '{ "activated": "false" }';
}
location /preocupateCero {
default_type application/json;
add_header Access-Control-Allow-Origin "$corsheader";
add_header Access-Control-Allow-Headers "DNT,X-CustomHeader,Keep-Alive,User-Agent,X-Requested-With,If-Modified-Since,Cache-Control,Content-Type,Authorization,Cookie,Content-Encoding,Customer-Session-ID,withCredentials";
add_header Access-Control-Allow-Credentials "true";
add_header Access-Control-Allow-Methods "GET";
return 200 '{ "activated": "${preocupateCero}" }';
}
location /preocupateCero/true {
add_header Set-Cookie "preocupateCero=true; Max-Age=3600";
default_type application/json;
return 200 '{ "activated": "true" }';
}
location /preocupateCero/false {
add_header Set-Cookie "preocupateCero=false; Max-Age=3600";
default_type application/json;
return 200 '{ "activated": "false" }';
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment