This file contains hidden or 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
AWSTemplateFormatVersion: "2010-09-09" | |
Transform: "AWS::Serverless-2016-10-31" | |
Resources: | |
LogGroup: | |
Type: AWS::Logs::LogGroup | |
Properties: | |
LogGroupName: !Sub /aws/lambda/${StackCreatedFunction} | |
RetentionInDays: 7 |
This file contains hidden or 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
import crypto from 'crypto' | |
const COOKIE_NAME = 'session' | |
const COOKIE_GET_HEADER = 'Cookie' | |
const COOKIE_SET_HEADER = 'Set-Cookie' | |
const ENCRYPTION_ALGORITHM = 'aes-256-cbc' | |
/** | |
* Decode session from cookie header | |
* |
This file contains hidden or 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
AWSTemplateFormatVersion: '2010-09-09' | |
Transform: AWS::Serverless-2016-10-31 | |
Description: Mocked HTTP API | |
Parameters: | |
ThrottlingRateLimit: | |
Type: Number | |
Description: The rate limit for the mock API. | |
Default: 1 |
OlderNewer