What is the use sub_filter directives in Nginx?

devquora
devquora

Posted On: Feb 22, 2018

 

    2 Answers Written

  •  devquora
    Answered by Sooraj

    The sub_filter directive in Nginx is used to perform substitutions on the response body content. It allows you to search for a specific string or pattern in the response and replace it with another string. This directive is typically used for on-the-fly content modification and rewriting within Nginx.

  •  devquora
    Answered by Ishan

    In short, the main difference between Ajax and a REST API is their purpose and scope:

    Ajax (Asynchronous JavaScript and XML): Ajax is a technique used to send and retrieve data from a server asynchronously without requiring a full page reload. It enables dynamic content updates on a web page without disrupting the user experience. Ajax uses JavaScript to make asynchronous HTTP requests to a server and receive responses in various formats, such as JSON or XML.

    REST API (Representational State Transfer Application Programming Interface): REST API is an architectural style that defines a set of principles for designing networked applications. It provides a standardized approach for creating, accessing, and manipulating resources over a network. REST APIs are based on HTTP and use the HTTP methods (GET, POST, PUT, DELETE) to perform operations on resources. They typically exchange data in a structured format, such as JSON or XML.

Related Questions

Please Login or Register to leave a response.

Related Questions

Nginx Interview Questions

What is Nginx?

Nginx is a type of an open source web server which is especially used for reverse proxy, load balancer,..

Nginx Interview Questions

In what language was the Nginx software being written?

The language in which the Nginx software is written is ‘C’ Language...

Nginx Interview Questions

What are the main tasks of the Nginx web server?

The following are the main tasks of the Nginx web server:..