HomeDevCentral

Honour nginx rewrite directive

Description

Honour nginx rewrite directive

Summary:
To use DOCUMENT_URI instead of REQUEST_URI allow
this rewrite rule in nginx, introduced in D1314:

rewrite ^/servers\-log/?(.*)$ /$1 break;

This allows to serve the service at /servers-log,
but to read the document URI relative to the service root.

An immediate benefit is to separate concerns:

  • the web server is responsible to define the mounting point and to give to the service a clean URL,
  • the service is responsible to handle a request, taking in consideration this clean URL.

This change is needed by ad35fd26f9a9.

Test Plan: Tested with ad35fd26f9a9 configuration.

Reviewers: dereckson

Reviewed By: dereckson

Differential Revision: https://devcentral.nasqueron.org/D1315

Details

Provenance
derecksonAuthored on Feb 16 2018, 22:57
derecksonPushed on Feb 16 2018, 23:02
Reviewer
dereckson
Differential Revision
D1315: Honour nginx rewrite directive
Parents
rAPISRVLOGSdc3de75449c0: Replace object return value by class type
Branches
Unknown
Tags
Unknown
Tasks
T1255: Create a temporary API to receive server logs