Skip to content

Commit ca34518

Browse files
Update api_only_protection example
1 parent 532dbe3 commit ca34518

1 file changed

Lines changed: 1 addition & 1 deletion

File tree

  • examples/node-16-9-1/express-4-16-1/api_only_protection

examples/node-16-9-1/express-4-16-1/api_only_protection/index.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@ const crowdHandlerMiddleware = async (req, res, next) => {
1111
if (method === "POST" || method === "PUT") {
1212
const publicKey = "YOUR_PUBLIC_KEY";
1313
const public_client = new crowdhandler.PublicClient(publicKey);
14-
const ch_context = new crowdhandler.RequestContext(req, res);
14+
const ch_context = new crowdhandler.RequestContext({request: req, response: res});
1515
const ch_gatekeeper = new crowdhandler.Gatekeeper(
1616
public_client,
1717
ch_context,

0 commit comments

Comments
 (0)