How do you know in nginx that the request is fulfilled through ssi include?



  • How do you know in nginx that the request is fulfilled through ssi include?
    Example of the configuration file nginx:

    server {
    
    ...
    
    ssi on;
    
    location ~* \.php$ {
    
        ...
    
        fastcgi_param REQUEST_SSI <здесь я присвою значение 1, если запрос выполняется через ssi include>
    }
    

    }

    HTML:
    <!--#include virtual="/header.php"-->



  • of http://nginx.org/ru/docs/http/ngx_http_ssi_module.html :

    ngx_http_ssi_module is is a filter handling SSI teams (Server Side Includes) in its responses.

    support ssi (sighs) https://ru.wikipedia.org/wiki/SSI_(%D0%BF%D1%80%D0%BE%D0%B3%D1%80%D0%B0%D0%BC%D0%BC%D0%B8%D1%80%D0%BE%D0%B2%D0%B0%D0%BD%D0%B8%D0%B5) You already. We'll get the answer back from the back. nginx pass it through the filter before the top.

    If you need a Bakend to inform you that nginx team handling ssi - Tell me, if you're going to have one of the variables, you're gonna have to take one, for example, so that the Bakend understands that.


    a for separation include virtual the necessary parameter may be added urle.g.:

    <!--#include virtual="header.php?ssi=on"-->
    

Log in to reply
 


Suggested Topics

  • 2
  • 2
  • 2
  • 2
  • 2
  • 2
  • 2
  • 2
  • 2
  • 2
  • 2
  • 2
  • 2
  • 2
  • 2