Skip to content
This repository was archived by the owner on May 1, 2020. It is now read-only.

Commit 771ee63

Browse files
Airbladerdanbucholtz
authored andcommitted
fix(proxy): add a cookieRewrite option which is passed to proxy-middleware. (#1226)
This allows cookies to be forwarded correctly when using a proxy to an HTTPS URL. Related: * #454 * ionic-team/ionic-cli#415
1 parent 93db0ef commit 771ee63

File tree

2 files changed

+3
-1
lines changed

2 files changed

+3
-1
lines changed

src/dev-server/http-server.ts

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -63,6 +63,7 @@ function setupProxies(app: express.Application) {
6363
}
6464

6565
opts.rejectUnauthorized = !(proxy.rejectUnauthorized === false);
66+
opts.cookieRewrite = proxy.cookieRewrite;
6667

6768
app.use(proxy.path, proxyMiddleware(opts));
6869
Logger.info('Proxy added:' + proxy.path + ' => ' + url.format(opts));

src/util/ionic-project.ts

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,8 @@ export interface IonicProject {
1010
path: string,
1111
proxyUrl: string,
1212
proxyNoAgent: boolean,
13-
rejectUnauthorized: boolean
13+
rejectUnauthorized: boolean,
14+
cookieRewrite: string | boolean,
1415
}[];
1516
}
1617

0 commit comments

Comments
 (0)