Welcome! Log In Create A New Profile

Advanced

How do I add text to a response from a remote URL in NGINX?

August 31, 2020 03:49AM
Hi,

I have the following server in NGINX and it works fine. But, I am wondering is it possible to add text to a response from a remote URL where hosts my before_body.txt and after_body.txt? Is there any way to tackle this? Is it possible at all?

server {
listen 80;

root /storage/path;
index index.html;

server_name test.domain.com;

location / {
try_files $uri $uri/ =404;
add_before_body /src/before_body.txt;
add_after_body /src/after_body.txt;
autoindex on;
}

location /src/ {
alias /storage/path/content/;
}
}
Subject Author Posted

How do I add text to a response from a remote URL in NGINX?

moyamos August 31, 2020 03:49AM

RE: How do I add text to a response from a remote URL in NGINX?

Reinis Rozitis August 31, 2020 09:24AM

Re: RE: How do I add text to a response from a remote URL in NGINX?

moyamos September 01, 2020 01:12AM

Re: How do I add text to a response from a remote URL in NGINX?

Francis Daly September 01, 2020 07:08AM

Re: How do I add text to a response from a remote URL in NGINX?

moyamos September 01, 2020 08:40AM

RE: How do I add text to a response from a remote URL in NGINX?

Reinis Rozitis September 01, 2020 09:56AM

Re: How do I add text to a response from a remote URL in NGINX?

Francis Daly September 01, 2020 09:58AM

Re: How do I add text to a response from a remote URL in NGINX?

moyamos September 02, 2020 09:11AM



Sorry, only registered users may post in this forum.

Click here to login

Online Users

Guests: 280
Record Number of Users: 8 on April 13, 2023
Record Number of Guests: 421 on December 02, 2018
Powered by nginx      Powered by FreeBSD      PHP Powered      Powered by MariaDB      ipv6 ready