changeset 2206:5cacd6fffade

Eliminated some examples of unsafe prefix locations.
author Ruslan Ermilov <ru@nginx.com>
date Fri, 27 Apr 2018 09:59:51 +0300
parents e325638a6f34
children 6f9fd9677d1b
files xml/en/docs/example.xml xml/en/docs/http/ngx_http_core_module.xml xml/en/docs/http/ngx_http_fastcgi_module.xml xml/en/docs/http/ngx_http_hls_module.xml xml/en/docs/http/ngx_http_js_module.xml xml/en/docs/http/ngx_http_mirror_module.xml xml/en/docs/http/ngx_http_ssi_module.xml xml/en/docs/http/ngx_http_stub_status_module.xml xml/ru/docs/example.xml xml/ru/docs/http/ngx_http_core_module.xml xml/ru/docs/http/ngx_http_fastcgi_module.xml xml/ru/docs/http/ngx_http_hls_module.xml xml/ru/docs/http/ngx_http_js_module.xml xml/ru/docs/http/ngx_http_mirror_module.xml xml/ru/docs/http/ngx_http_ssi_module.xml xml/ru/docs/http/ngx_http_stub_status_module.xml
diffstat 16 files changed, 38 insertions(+), 38 deletions(-) [+]
line wrap: on
line diff
--- a/xml/en/docs/example.xml
+++ b/xml/en/docs/example.xml
@@ -8,7 +8,7 @@
 <article name="Example nginx configuration"
          link="/en/docs/example.html"
          lang="en"
-         rev="2">
+         rev="3">
 
 <section>
 
@@ -116,7 +116,7 @@ http {
 
         error_page  404  /404.html;
 
-        location /404.html {
+        location = /404.html {
             root  /spool/www;
         }
 
--- a/xml/en/docs/http/ngx_http_core_module.xml
+++ b/xml/en/docs/http/ngx_http_core_module.xml
@@ -10,7 +10,7 @@
 <module name="Module ngx_http_core_module"
         link="/en/docs/http/ngx_http_core_module.html"
         lang="en"
-        rev="79">
+        rev="80">
 
 <section id="directives" name="Directives">
 
@@ -864,7 +864,7 @@ Example:
 <example>
 error_page 404 /404.html;
 
-location /404.html {
+location = /404.html {
     internal;
 }
 </example>
--- a/xml/en/docs/http/ngx_http_fastcgi_module.xml
+++ b/xml/en/docs/http/ngx_http_fastcgi_module.xml
@@ -10,7 +10,7 @@
 <module name="Module ngx_http_fastcgi_module"
         link="/en/docs/http/ngx_http_fastcgi_module.html"
         lang="en"
-        rev="49">
+        rev="50">
 
 <section id="summary">
 
@@ -786,7 +786,7 @@ If the <value>string</value> is found th
 server has returned an <link id="fastcgi_next_upstream">invalid response</link>.
 This allows handling application errors in nginx, for example:
 <example>
-location /php {
+location /php/ {
     fastcgi_pass backend:9000;
     ...
     fastcgi_catch_stderr "PHP Fatal error";
--- a/xml/en/docs/http/ngx_http_hls_module.xml
+++ b/xml/en/docs/http/ngx_http_hls_module.xml
@@ -9,7 +9,7 @@
 <module name="Module ngx_http_hls_module"
         link="/en/docs/http/ngx_http_hls_module.html"
         lang="en"
-        rev="6">
+        rev="7">
 
 <section id="summary">
 
@@ -197,11 +197,11 @@ http {
     server {
         ...
 
-        location /hls {
+        location /hls/ {
             hls;
             hls_forward_args on;
 
-            alias /var/videos;
+            alias /var/videos/;
 
             secure_link $arg_md5,$arg_expires;
             secure_link_md5 "$secure_link_expires$hls_uri$remote_addr secret";
--- a/xml/en/docs/http/ngx_http_js_module.xml
+++ b/xml/en/docs/http/ngx_http_js_module.xml
@@ -9,7 +9,7 @@
 <module name="Module ngx_http_js_module"
         link="/en/docs/http/ngx_http_js_module.html"
         lang="en"
-        rev="14">
+        rev="15">
 
 <section id="summary">
 
@@ -50,11 +50,11 @@ http {
             js_content baz;
         }
 
-        location /summary {
+        location = /summary {
             return 200 $summary;
         }
 
-        location /hello {
+        location = /hello {
             js_content hello;
         }
     }
--- a/xml/en/docs/http/ngx_http_mirror_module.xml
+++ b/xml/en/docs/http/ngx_http_mirror_module.xml
@@ -9,7 +9,7 @@
 <module name="Module ngx_http_mirror_module"
         link="/en/docs/http/ngx_http_mirror_module.html"
         lang="en"
-        rev="2">
+        rev="3">
 
 <section id="summary">
 
@@ -32,7 +32,7 @@ location / {
     proxy_pass http://backend;
 }
 
-location /mirror {
+location = /mirror {
     internal;
     proxy_pass http://test_backend$request_uri;
 }
@@ -85,7 +85,7 @@ location / {
     proxy_pass http://backend;
 }
 
-location /mirror {
+location = /mirror {
     internal;
     proxy_pass http://log_backend;
     proxy_pass_request_body off;
--- a/xml/en/docs/http/ngx_http_ssi_module.xml
+++ b/xml/en/docs/http/ngx_http_ssi_module.xml
@@ -10,7 +10,7 @@
 <module name="Module ngx_http_ssi_module"
         link="/en/docs/http/ngx_http_ssi_module.html"
         lang="en"
-        rev="11">
+        rev="12">
 
 <section id="summary">
 
@@ -370,7 +370,7 @@ The maximum size of the response is set 
 <link doc="ngx_http_core_module.xml" id="subrequest_output_buffer_size"/>
 directive (1.13.10):
 <example>
-location /remote {
+location /remote/ {
     subrequest_output_buffer_size 64k;
     ...
 }
--- a/xml/en/docs/http/ngx_http_stub_status_module.xml
+++ b/xml/en/docs/http/ngx_http_stub_status_module.xml
@@ -10,7 +10,7 @@
 <module name="Module ngx_http_stub_status_module"
         link="/en/docs/http/ngx_http_stub_status_module.html"
         lang="en"
-        rev="3">
+        rev="4">
 
 <section id="summary">
 
@@ -32,7 +32,7 @@ configuration parameter.
 
 <para>
 <example>
-location /basic_status {
+location = /basic_status {
     stub_status;
 }
 </example>
--- a/xml/ru/docs/example.xml
+++ b/xml/ru/docs/example.xml
@@ -8,7 +8,7 @@
 <article name="Пример конфигурации nginx"
          link="/ru/docs/example.html"
          lang="ru"
-         rev="2">
+         rev="3">
 
 <section>
 
@@ -116,7 +116,7 @@ http {
 
         error_page  404  /404.html;
 
-        location /404.html {
+        location = /404.html {
             root  /spool/www;
         }
 
--- a/xml/ru/docs/http/ngx_http_core_module.xml
+++ b/xml/ru/docs/http/ngx_http_core_module.xml
@@ -10,7 +10,7 @@
 <module name="Модуль ngx_http_core_module"
         link="/ru/docs/http/ngx_http_core_module.html"
         lang="ru"
-        rev="79">
+        rev="80">
 
 <section id="directives" name="Директивы">
 
@@ -860,7 +860,7 @@ error_page 404 =301 http://example.com/n
 <example>
 error_page 404 /404.html;
 
-location /404.html {
+location = /404.html {
     internal;
 }
 </example>
--- a/xml/ru/docs/http/ngx_http_fastcgi_module.xml
+++ b/xml/ru/docs/http/ngx_http_fastcgi_module.xml
@@ -10,7 +10,7 @@
 <module name="Модуль ngx_http_fastcgi_module"
         link="/ru/docs/http/ngx_http_fastcgi_module.html"
         lang="ru"
-        rev="49">
+        rev="50">
 
 <section id="summary">
 
@@ -788,7 +788,7 @@ fastcgi_cache_valid any      1m;
 вернул <link id="fastcgi_next_upstream">неверный ответ</link>.
 Это позволяет обрабатывать ошибки приложений в nginx, например:
 <example>
-location /php {
+location /php/ {
     fastcgi_pass backend:9000;
     ...
     fastcgi_catch_stderr "PHP Fatal error";
--- a/xml/ru/docs/http/ngx_http_hls_module.xml
+++ b/xml/ru/docs/http/ngx_http_hls_module.xml
@@ -9,7 +9,7 @@
 <module name="Module ngx_http_hls_module"
         link="/ru/docs/http/ngx_http_hls_module.html"
         lang="ru"
-        rev="6">
+        rev="7">
 
 <section id="summary">
 
@@ -197,11 +197,11 @@ http {
     server {
         ...
 
-        location /hls {
+        location /hls/ {
             hls;
             hls_forward_args on;
 
-            alias /var/videos;
+            alias /var/videos/;
 
             secure_link $arg_md5,$arg_expires;
             secure_link_md5 "$secure_link_expires$hls_uri$remote_addr secret";
--- a/xml/ru/docs/http/ngx_http_js_module.xml
+++ b/xml/ru/docs/http/ngx_http_js_module.xml
@@ -9,7 +9,7 @@
 <module name="Модуль ngx_http_js_module"
         link="/ru/docs/http/ngx_http_js_module.html"
         lang="ru"
-        rev="14">
+        rev="15">
 
 <section id="summary">
 
@@ -50,11 +50,11 @@ http {
             js_content baz;
         }
 
-        location /summary {
+        location = /summary {
             return 200 $summary;
         }
 
-        location /hello {
+        location = /hello {
             js_content hello;
         }
     }
--- a/xml/ru/docs/http/ngx_http_mirror_module.xml
+++ b/xml/ru/docs/http/ngx_http_mirror_module.xml
@@ -9,7 +9,7 @@
 <module name="Модуль ngx_http_mirror_module"
         link="/ru/docs/http/ngx_http_mirror_module.html"
         lang="ru"
-        rev="2">
+        rev="3">
 
 <section id="summary">
 
@@ -32,7 +32,7 @@ location / {
     proxy_pass http://backend;
 }
 
-location /mirror {
+location = /mirror {
     internal;
     proxy_pass http://test_backend$request_uri;
 }
@@ -85,7 +85,7 @@ location / {
     proxy_pass http://backend;
 }
 
-location /mirror {
+location = /mirror {
     internal;
     proxy_pass http://log_backend;
     proxy_pass_request_body off;
--- a/xml/ru/docs/http/ngx_http_ssi_module.xml
+++ b/xml/ru/docs/http/ngx_http_ssi_module.xml
@@ -10,7 +10,7 @@
 <module name="Модуль ngx_http_ssi_module"
         link="/ru/docs/http/ngx_http_ssi_module.html"
         lang="ru"
-        rev="11">
+        rev="12">
 
 <section id="summary">
 
@@ -374,7 +374,7 @@ SSI, например:
 <link doc="ngx_http_core_module.xml" id="subrequest_output_buffer_size"/>
 (1.13.10):
 <example>
-location /remote {
+location /remote/ {
     subrequest_output_buffer_size 64k;
     ...
 }
--- a/xml/ru/docs/http/ngx_http_stub_status_module.xml
+++ b/xml/ru/docs/http/ngx_http_stub_status_module.xml
@@ -10,7 +10,7 @@
 <module name="Модуль ngx_http_stub_status_module"
         link="/ru/docs/http/ngx_http_stub_status_module.html"
         lang="ru"
-        rev="3">
+        rev="4">
 
 <section id="summary">
 
@@ -32,7 +32,7 @@
 
 <para>
 <example>
-location /basic_status {
+location = /basic_status {
     stub_status;
 }
 </example>