Skip to content

Commit

Permalink
Adapt to current state of PR SAP/ui5-server#179
Browse files Browse the repository at this point in the history
  • Loading branch information
codeworrior committed Apr 18, 2019
1 parent a5fffaa commit 091de00
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 6 deletions.
4 changes: 2 additions & 2 deletions lib/cli/commands/serve.js
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,7 @@ serve.builder = function(cli) {
type: "string"
})
.option("sap-csp-policies", {
describe: "always send content security policies 'sap-target-level-1' and 'sap-target-level-2' in report-only mode",
describe: "Always send content security policies 'sap-target-level-1' and 'sap-target-level-2' in report-only mode",
default: false,
type: "boolean"
})
Expand Down Expand Up @@ -67,7 +67,7 @@ serve.handler = function(argv) {
acceptRemoteConnections: !!argv.acceptRemoteConnections,
cert: argv.h2 ? argv.cert : undefined,
key: argv.h2 ? argv.key : undefined,
sendSapPolicies: !!argv.sapCspPolicies
sendSAPTargetCSP: !!argv.sapCspPolicies
};

if (!serverConfig.h2) {
Expand Down
8 changes: 4 additions & 4 deletions test/lib/cli/commands/serve.js
Original file line number Diff line number Diff line change
Expand Up @@ -57,7 +57,7 @@ test.serial("ui5 serve: default", async (t) => {
port: 8080,
cert: undefined,
key: undefined,
sendSapPolicies: false
sendSAPTargetCSP: false
}, "Starting server with specific server config");
});

Expand Down Expand Up @@ -93,7 +93,7 @@ test.serial("ui5 serve --h2", async (t) => {
port: 8443,
key: "randombyte-likes-ponies-key",
cert: "randombyte-likes-ponies-cert",
sendSapPolicies: false
sendSAPTargetCSP: false
}, "Starting server with specific server config");
});

Expand Down Expand Up @@ -164,7 +164,7 @@ test.serial("ui5 serve --key --cert", async (t) => {
port: 8443,
key: "ponies-loaded-from-custompath-key",
cert: "ponies-loaded-from-custompath-crt",
sendSapPolicies: false
sendSAPTargetCSP: false
}, "Starting server with specific server config");
});

Expand Down Expand Up @@ -208,6 +208,6 @@ test.serial("ui5 serve --sap-csp-policies", async (t) => {
port: 8080,
cert: undefined,
key: undefined,
sendSapPolicies: true
sendSAPTargetCSP: true
}, "Starting server with specific server config");
});

0 comments on commit 091de00

Please sign in to comment.