Commit 2885f707 by smaeda-ks

Replace nginx redirect method from rewrite to return for speeding up

parent ff6039cd
......@@ -29,7 +29,7 @@ server {
# Execute the actual redirect
if ($do_redirect_to_https = "true")
{
rewrite ^ https://$host$request_uri? permanent;
return 301 https://$host$request_uri;
}
{% endif %}
......
......@@ -64,7 +64,7 @@ error_page {{ k }} {{ v }};
# Execute the actual redirect
if ($do_redirect_to_https = "true")
{
rewrite ^ https://$host$request_uri? permanent;
return 301 https://$host$request_uri;
}
{% endif %}
......
......@@ -80,7 +80,7 @@ location @proxy_to_app {
# Execute the actual redirect
if ($do_redirect_to_https = "true")
{
rewrite ^ https://$host$request_uri? permanent;
return 301 https://$host$request_uri;
}
{% endif %}
}
......@@ -50,7 +50,7 @@ server {
# Execute the actual redirect
if ($do_redirect_to_https = "true")
{
rewrite ^ https://$host$request_uri? permanent;
return 301 https://$host$request_uri;
}
{% endif %}
......
......@@ -29,7 +29,7 @@ server {
# Execute the actual redirect
if ($do_redirect_to_https = "true")
{
rewrite ^ https://$host$request_uri? permanent;
return 301 https://$host$request_uri;
}
{% endif %}
......
......@@ -55,7 +55,7 @@ location @proxy_to_app {
# Execute the actual redirect
if ($do_redirect_to_https = "true")
{
rewrite ^ https://$host$request_uri? permanent;
return 301 https://$host$request_uri;
}
{% endif %}
}
......@@ -45,7 +45,7 @@ server {
# Execute the actual redirect
if ($do_redirect_to_https = "true")
{
rewrite ^ https://$host$request_uri? permanent;
return 301 https://$host$request_uri;
}
{% endif %}
......
......@@ -98,7 +98,7 @@ server {
# Execute the actual redirect
if ($do_redirect_to_https = "true")
{
rewrite ^ https://$host$request_uri? permanent;
return 301 https://$host$request_uri;
}
{% endif %}
......
......@@ -84,7 +84,7 @@ error_page {{ k }} {{ v }};
# Execute the actual redirect
if ($do_redirect_to_https = "true")
{
rewrite ^ https://$host$request_uri? permanent;
return 301 https://$host$request_uri;
}
{% endif %}
......@@ -118,7 +118,7 @@ error_page {{ k }} {{ v }};
{% include "basic-auth.j2" %}
{% if NGINX_EDXAPP_EMBARGO_CIDRS -%}
if ( $embargo ) {
rewrite ^ /embargo;
return 302 /embargo;
}
{% endif -%}
try_files $uri @proxy_to_lms_app;
......
......@@ -53,7 +53,7 @@ server {
# Execute the actual redirect
if ($do_redirect_to_https = "true")
{
rewrite ^ https://$host$request_uri? permanent;
return 301 https://$host$request_uri;
}
{% endif %}
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment