source:
binary-improvements2/MapRendering/Web/Handlers/RewriteHandler.cs@
388
| Last change on this file since 388 was 387, checked in by , 3 years ago | |
|---|---|
| File size: 540 bytes | |
| Rev | Line | |
|---|---|---|
| [382] | 1 | namespace AllocsFixes.NetConnections.Servers.Web.Handlers { |
| 2 | public class RewriteHandler : AbsHandler { | |
| 3 | private readonly string target; | |
| 4 | private readonly bool fixedTarget; | |
| 5 | ||
| 6 | public RewriteHandler (string _target, bool _fixedTarget = false) : base (null) { | |
| 7 | target = _target; | |
| 8 | fixedTarget = _fixedTarget; | |
| 9 | } | |
| 10 | ||
| [387] | 11 | public override void HandleRequest (RequestContext _context) { |
| 12 | _context.RequestPath = fixedTarget ? target : target + _context.RequestPath.Remove (0, urlBasePath.Length); | |
| 13 | parent.ApplyPathHandler (_context); | |
| [382] | 14 | } |
| 15 | } | |
| 16 | } |
Note:
See TracBrowser
for help on using the repository browser.
![(please configure the [header_logo] section in trac.ini)](/chrome/site/your_project_logo.png)