Upgrade to Pro — share decks privately, control downloads, hide ads and more …

NginxとELBの罠

Sponsored · SiteGround - Reliable hosting with speed, security, and support you can count on.
Avatar for innossh innossh
November 25, 2017

 NginxとELBの罠

Avatar for innossh

innossh

November 25, 2017
Tweet

More Decks by innossh

Other Decks in Technology

Transcript

  1. Ϩεϙϯεϔομ͸Ͳ͏ͳΔʁ location /if {
 set $true 1;
 
 if ($true)

    {
 add_header X-First 1;
 }
 if ($true) {
 add_header X-Second 2;
 }
 return 204;
 }
  2. "9'JSTUͱ94FDPOE#9'JSTUͷΈ $94FDPOEͷΈ location /if {
 set $true 1;
 
 if

    ($true) {
 add_header X-First 1;
 }
 if ($true) {
 add_header X-Second 2;
 }
 return 204;
 }
  3. ౴͑$94FDPOEͷΈ location /if {
 set $true 1;
 
 if ($true)

    {
 add_header X-First 1;
 }
 if ($true) {
 add_header X-Second 2;
 }
 return 204;
 }
  4. ϦΫΤετϔομ͸Ͳ͏ͳΔʁ http {
 proxy_set_header X-Foo foo;
 
 server {
 proxy_set_header

    X-Bar bar;
 
 location /proxysetheader {
 proxy_pass http://localhost:8080;
 proxy_set_header X-Baz baz;
 }
 }
 }
  5. "9'PPͱ9#BSͱ9#B[ #9#BSͱ9#B[$9#B[ͷΈ http {
 proxy_set_header X-Foo foo;
 
 server {


    proxy_set_header X-Bar bar;
 
 location /proxysetheader {
 proxy_pass http://localhost:8080;
 proxy_set_header X-Baz baz;
 }
 }
 }
  6. ౴͑$9#B[ͷΈ http {
 proxy_set_header X-Foo foo;
 
 server {
 proxy_set_header

    X-Bar bar;
 
 location /proxysetheader {
 proxy_pass http://localhost:8080;
 proxy_set_header X-Baz baz;
 }
 }
 }
  7. http {
 proxy_set_header X-Foo foo;
 
 server {
 proxy_set_header X-Bar

    bar;
 
 location /proxysetheader {
 proxy_pass http://localhost:8080;
 proxy_set_header X-Foo foo;
 proxy_set_header X-Bar bar;
 proxy_set_header X-Baz baz;
 }
 }
 }
  8. 7BSOJTI͸$POUFOU-FOHUIΛ HTTP/1.1 200 OK Server: varnish Date: Tue, 22 Aug

    2017 10:44:59 GMT Content-Type: application/json; charset=utf-8 Connection: keep-alive Status: 200 OK Content-Length: 20 Cache-Control: max-age=0, no-cache, no-store
  9. 0QFO3FTUZ͸USBOTGFSFODPEJOHΛ HTTP/1.1 200 OK Server: openresty Date: Tue, 22 Aug

    2017 10:44:59 GMT Content-Type: application/json; charset=utf-8 Connection: keep-alive Status: 200 OK transfer-encoding: chunked Cache-Control: max-age=0, no-cache, no-store
  10. όοΫΤϯυʹ஫໨ HTTP/1.1 200 OK Date: Tue, 22 Aug 2017 10:44:59

    GMT Content-Type: application/json; charset=utf-8 Connection: close Content-Length: 20 ↑Content-Length͸෇͍͍ͯͳ͍ Status: 200 OK Cache-Control: max-age=0, no-cache, no-store
  11. ͦΕͳΒ0QFO3FTUZʹ஫໨ HTTP/1.1 200 OK Server: openresty Date: Tue, 22 Aug

    2017 10:44:59 GMT Content-Type: application/json; charset=utf-8 Connection: keep-alive Status: 200 OK Transfer-Encoding: chunked Cache-Control: max-age=0, no-cache, no-store
  12. DIVOLFE@USBOTGFS@FODPEJOHΛPGGʹ HTTP/1.1 200 OK Server: openresty Date: Tue, 22 Aug

    2017 10:44:59 GMT Content-Type: application/json; charset=utf-8 Connection: keep-alive Status: 200 OK transfer-encoding: chunked Cache-Control: max-age=0, no-cache, no-store
  13. HTTP/1.1 200 OK Server: openresty Date: Tue, 22 Aug 2017

    10:44:59 GMT Content-Type: application/json; charset=utf-8 Connection: keep-alive Status: 200 OK transfer-encoding: chunked Cache-Control: max-age=0, no-cache, no-store