Last change
on this file since 76712b2 was 6a3a178, checked in by Ema <ema_spirova@…>, 3 years ago |
initial commit
|
-
Property mode
set to
100644
|
File size:
280 bytes
|
Line | |
---|
1 | /**
|
---|
2 | * Strip hostname from request path
|
---|
3 | * This to handle requests that uses (normally over proxies) an absoluteURI as request path
|
---|
4 | */
|
---|
5 |
|
---|
6 | function stripHostFromUrl (url) {
|
---|
7 | return url.replace(/^https?:\/\/[a-z.:\d-]+\//, '/')
|
---|
8 | }
|
---|
9 |
|
---|
10 | // PUBLIC API
|
---|
11 | exports.stripHost = stripHostFromUrl
|
---|
Note:
See
TracBrowser
for help on using the repository browser.