Skip to content

Added new template for combined firstParty and Enforcer lambdas#3

Open
EldarHuman wants to merge 1 commit intomainfrom
combined_lambdas_firstparty_enforcer
Open

Added new template for combined firstParty and Enforcer lambdas#3
EldarHuman wants to merge 1 commit intomainfrom
combined_lambdas_firstparty_enforcer

Conversation

@EldarHuman
Copy link
Contributor

No description provided.

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I would suggest reorganizing the files and directories for clarity. What I might do is have the most basic usage of our library in the src directory and then have another sub-folder for additional examples (combined enforcer + first party, async config, etc) that won't be compiled.

src/

  • HumanFirstPartyLambda
  • HumanEnforceLambda
  • HumanActivitiesLambda
  • code_samples/
    • EnforceAndFirstPartyOriginRequestLambda
    • AsyncConfigLambdaExample
    • ...

Or something like this.

Comment on lines +18 to +19
const enforcer = HumanSecurityEnforcer.initialize(config);
const firstParty = HumanSecurityFirstParty.initialize(config);
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Should be initialized once instead of on every invocation of the handler. Store them in global variables and reuse them.

# variable declarations
build_dir=dist
lambdas=( PXEnforcer PXFirstParty PXActivities )
lambdas=( PXEnforcer PXFirstParty PXActivities PXCombined_Enforcer_FirstParty)
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Do we need this?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants