Skip to content
This repository has been archived by the owner on May 3, 2024. It is now read-only.

Commit

Permalink
feat(one-app-dev-cdn): pass use-host flag (#138)
Browse files Browse the repository at this point in the history
  • Loading branch information
infoxicator authored May 13, 2020
1 parent 4aba8ec commit b7202ca
Show file tree
Hide file tree
Showing 7 changed files with 206 additions and 187 deletions.
1 change: 1 addition & 0 deletions __tests__/server/__snapshots__/index.spec.js.snap
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,7 @@ Array [
"version",
"m",
"use-middleware",
"use-host",
]
`;

Expand Down
15 changes: 13 additions & 2 deletions __tests__/server/config/env/__snapshots__/argv.spec.js.snap
Original file line number Diff line number Diff line change
Expand Up @@ -32,6 +32,17 @@ Array [
`;

exports[`argv config has development options and defaults 4`] = `
Array [
"use-host",
Object {
"default": false,
"describe": "use req.headers.host instead of localhost for one-app-dev-cdn",
"type": "boolean",
},
]
`;

exports[`argv config has development options and defaults 5`] = `
Array [
"log-format",
Object {
Expand All @@ -47,7 +58,7 @@ Array [
]
`;

exports[`argv config has development options and defaults 5`] = `
exports[`argv config has development options and defaults 6`] = `
Array [
"log-level",
Object {
Expand All @@ -64,7 +75,7 @@ Array [
]
`;

exports[`argv config has development options and defaults 6`] = `
exports[`argv config has development options and defaults 7`] = `
Array [
Array [
Array [
Expand Down
3 changes: 2 additions & 1 deletion docs/api/server/Cli-Commands.md
Original file line number Diff line number Diff line change
Expand Up @@ -166,6 +166,7 @@ npm run build:sample-modules [--] [--archive-built-artifacts]
| `--root-module-name` | Name of the [Holocron Module] that serves as the entry point to your application. |
| `--module-map-url` | Remote Module Map URL for [`one-app-dev-cdn`] to proxy. *For Development.* |
| `--use-middleware` | Apply a custom middleware configuration for [`one-app-dev-proxy`]. *For Development.* |
| `--use-host` | Use `req.headers.host` instead of `localhost`. Passed as true or false to [`one-app-dev-cdn`]. *For Development.* |

#### Environment Variables

Expand Down Expand Up @@ -214,4 +215,4 @@ Please see the [Environment Variables](./Environment-Variables.md) API docs.
[Jest]: https://jestjs.io/
[ESLint]: https://eslint.org/
[Integration Test Suite]: ../../../__tests__/integration/README.md
[Express Middleware]: http://expressjs.com/en/guide/writing-middleware.html#writing-middleware-for-use-in-express-apps
[Express Middleware]: http://expressjs.com/en/guide/writing-middleware.html#writing-middleware-for-use-in-express-apps
Loading

0 comments on commit b7202ca

Please sign in to comment.