Skip to content

Commit

Permalink
feat(web): allow unsecure ssl proxy on file-server
Browse files Browse the repository at this point in the history
Fix usage of self-signed certificates while using a proxy in file-server executor.

  See #5118
  • Loading branch information
yannickglt committed Jan 27, 2022
1 parent 0959194 commit 1955462
Show file tree
Hide file tree
Showing 5 changed files with 20 additions and 0 deletions.
6 changes: 6 additions & 0 deletions docs/generated/api-web/executors/file-server.md
Expand Up @@ -53,6 +53,12 @@ Type: `string`

URL to proxy unhandled requests to.

### secure

Type: `boolean`

True if you want to verify the SSL Certs.

### ssl

Default: `false`
Expand Down
Expand Up @@ -53,6 +53,12 @@ Type: `string`

URL to proxy unhandled requests to.

### secure

Type: `boolean`

True if you want to verify the SSL Certs.

### ssl

Default: `false`
Expand Down
3 changes: 3 additions & 0 deletions packages/web/src/executors/file-server/file-server.impl.ts
Expand Up @@ -26,6 +26,9 @@ function getHttpServerArgs(options: Schema) {
if (options.proxyUrl) {
args.push(`-P ${options.proxyUrl}`);
}
if (typeof options.secure === 'boolean') {
args.push(`--proxy-options.secure ${options.secure}`);
}
return args;
}

Expand Down
1 change: 1 addition & 0 deletions packages/web/src/executors/file-server/schema.d.ts
Expand Up @@ -5,6 +5,7 @@ export interface Schema {
sslKey?: string;
sslCert?: string;
proxyUrl?: string;
secure?: boolean;
buildTarget: string;
parallel: boolean;
maxParallel?: number;
Expand Down
4 changes: 4 additions & 0 deletions packages/web/src/executors/file-server/schema.json
Expand Up @@ -48,6 +48,10 @@
"proxyUrl": {
"type": "string",
"description": "URL to proxy unhandled requests to."
},
"secure": {
"type": "boolean",
"description": "True if you want to verify the SSL Certs."
}
},
"additionalProperties": false,
Expand Down

0 comments on commit 1955462

Please sign in to comment.