-
Notifications
You must be signed in to change notification settings - Fork 3
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
1 changed file
with
29 additions
and
0 deletions.
There are no files selected for viewing
29 changes: 29 additions & 0 deletions
29
apps/pre-award/copilot/environments/addons/basic-auth-cloudfront-function.yml
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,29 @@ | ||
Parameters: | ||
App: | ||
Type: String | ||
Description: Your application's name. | ||
Env: | ||
Type: String | ||
Description: The environment name your service, job, or workflow is being deployed to. | ||
Resources: | ||
CloudFrontFunction: | ||
Type: AWS::CloudFront::Function | ||
Properties: | ||
Name: EnforceBasicAuth | ||
FunctionConfig: | ||
Comment: A basic CloudFront function | ||
Runtime: cloudfront-js-2.0 | ||
FunctionCode: | | ||
function handler(event) { | ||
// NOTE: This example function is for a viewer request event trigger. | ||
// Choose viewer request for the event trigger when you associate this function with a distribution. | ||
var response = { | ||
statusCode: 200, | ||
statusDescription: 'OK', | ||
headers: { | ||
'cloudfront-functions': { value: 'generated-by-CloudFront-Functions' } | ||
} | ||
}; | ||
return response; | ||
} | ||
AutoPublish: false |