Skip to content

Commit

Permalink
Sync
Browse files Browse the repository at this point in the history
  • Loading branch information
fwang committed Dec 22, 2023
1 parent 0452abb commit 480bbd5
Showing 1 changed file with 5 additions and 8 deletions.
13 changes: 5 additions & 8 deletions internal/components/src/components/nextjs.ts
Original file line number Diff line number Diff line change
Expand Up @@ -213,7 +213,9 @@ export class Nextjs extends Component {
this.server = serverFunction as unknown as Function;
this.edge = plan.edge;
this.registerOutputs({
_hint: this.cdn.domainUrl || this.cdn.url,
_hint: all([this.cdn.domainUrl, this.cdn.url]).apply(
([domainUrl, url]) => domainUrl || url
),
});

//app.registerTypes(this);
Expand Down Expand Up @@ -920,7 +922,6 @@ if (event.rawPath) {
function disableDefaultLogging() {
if (!serverFunction) return;

// TODO create log group and reference log group arn
const policy = new aws.iam.Policy(
`${name}DisableLoggingPolicy`,
{
Expand All @@ -935,12 +936,8 @@ if (event.rawPath) {
],
"Effect": "Deny",
"Resources": [
"arn:aws:logs:${$app.providers?.aws
?.region!}:*:log-group:/aws/lambda/${serverFunction?.nodes
.function.name}",
"arn:aws:logs:${$app.providers?.aws
?.region!}:*:log-group:/aws/lambda/${serverFunction?.nodes
.function.name}:*",
"${serverFunction.nodes.logGroup.logGroupArn}",
"${serverFunction.nodes.logGroup.logGroupArn}:*",
],
}
]
Expand Down

0 comments on commit 480bbd5

Please sign in to comment.