Skip to content

Commit

Permalink
Try again
Browse files Browse the repository at this point in the history
  • Loading branch information
oscartbeaumont committed Sep 25, 2024
1 parent d99f70f commit b8899c7
Showing 1 changed file with 7 additions and 2 deletions.
9 changes: 7 additions & 2 deletions sst.config.ts
Original file line number Diff line number Diff line change
Expand Up @@ -54,9 +54,13 @@ export default $config({

// Automatic
const INTERNAL_SECRET = new random.RandomString("internalSecret", {
length: 42,
length: 64,
overrideSpecial: "$-_.+!*'()",
});
const API_GATEWAY_SECRET = new random.RandomString("apiGatewaySecret", {
length: 40,
special: false,
});

// Defaults
$transform(sst.aws.Function, (args) => {
Expand Down Expand Up @@ -221,7 +225,7 @@ export default $config({
integrationMethod: "ANY",
integrationUri: urlForApiGateway,
requestParameters: {
"overwrite:header.x-apigateway-auth": INTERNAL_SECRET.result,
"overwrite:header.x-apigateway-auth": API_GATEWAY_SECRET.result,
"overwrite:path": "$request.path",
"overwrite:header.x-client-cert":
"$context.identity.clientCert.clientCertPem",
Expand Down Expand Up @@ -255,6 +259,7 @@ export default $config({
AXIOM_DATASET: "mattrax",
API_GATEWAY_ARN: manageApi.nodes.api.arn,
TRUSTSTORE_BUCKET: $interpolate`https://${truststoreBucket.domain}`,
API_GATEWAY_SECRET: API_GATEWAY_SECRET.result,
};

const web = CloudflarePages("web", {
Expand Down

0 comments on commit b8899c7

Please sign in to comment.