Page MenuHomeDevCentral

Honour nginx rewrite directive
ClosedPublic

Authored by dereckson on Feb 16 2018, 22:57.
Tags
None
Referenced Files
F9577576: D1315.id3377.diff
Sun, Jun 8, 12:54
F9567558: D1315.diff
Sun, Jun 8, 00:59
Unknown Object (File)
Fri, Jun 6, 12:31
Unknown Object (File)
Wed, Jun 4, 03:00
Unknown Object (File)
Sun, Jun 1, 07:39
Unknown Object (File)
Sat, May 31, 18:27
Unknown Object (File)
Fri, May 30, 20:01
Unknown Object (File)
Thu, May 22, 10:20
Subscribers
None

Details

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.

Diff Detail

Repository
rAPISRVLOGS Servers log :: Add new entries API
Lint
No Lint Coverage
Unit
No Test Coverage
Branch
honor-nginx-rewrite (branched from master)
Build Status
Buildable 2080
Build 2328: arc lint + arc unit

Event Timeline

dereckson created this revision.
This revision is now accepted and ready to land.Feb 16 2018, 22:58
This revision was automatically updated to reflect the committed changes.