Skip to content

Commit 05fbfd5

Browse files
committed
adding strict header check for player
1 parent 5c57b75 commit 05fbfd5

File tree

3 files changed

+8
-0
lines changed

3 files changed

+8
-0
lines changed

player/.env.example

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -9,6 +9,7 @@ DB_PASSWORD=quartz
99
CONTENT_URL=http://localhost:63398/content
1010

1111
PLAYER_ALTERNATE_AUTH_HEADER=
12+
PLAYER_REQUIRE_STRICT_HEADERS=
1213

1314
API_KEY="some API access key"
1415
API_SECRET="an API access secret"

player/docker-compose.yml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -46,6 +46,7 @@ services:
4646
- FIRST_TENANT_NAME
4747
- PLAYER_API_ROOT=${PLAYER_ROOT_PATH}
4848
- PLAYER_STANDALONE_LAUNCH_URL_BASE
49+
- PLAYER_REQUIRE_STRICT_HEADERS
4950
- HOST_PORT
5051
rdbms:
5152
image: mysql:8.0.31

player/service/index.js

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -35,6 +35,9 @@ const Hapi = require("@hapi/hapi"),
3535
} = process.env;
3636

3737
const rootPath = (process.env.PLAYER_API_ROOT || "");
38+
const requireStrictHeaders = (process.env.PLAYER_REQUIRE_STRICT_HEADERS || "true") == "true";
39+
40+
console.log("Using Strict Headers: ", requireStrictHeaders);
3841

3942
const provision = async () => {
4043
const server = Hapi.server(
@@ -46,6 +49,9 @@ const provision = async () => {
4649
response: {
4750
emptyStatusCode: 204
4851
}
52+
},
53+
state: {
54+
strictHeader: requireStrictHeaders
4955
}
5056
}
5157
),

0 commit comments

Comments
 (0)