Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

New example of IP blocking #213

Merged
merged 8 commits into from
Oct 21, 2024
Merged

New example of IP blocking #213

merged 8 commits into from
Oct 21, 2024

Conversation

hikaneko
Copy link
Contributor

New example of IP blocking

Copy link
Collaborator

@evan-hughes evan-hughes left a comment

Choose a reason for hiding this comment

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

The example should use the request.clientIp property.

Is there a standard copyright that should be included on the JavaScript?

import { blockedIPs } from './ipList.js';

export async function onClientRequest(request) {
const clientIP = request.getVariable('PMUSER_IP');
Copy link
Collaborator

Choose a reason for hiding this comment

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

I suggest using the new request.clientIp property instead of the PM variable. It will be easier to set up.

@hikaneko
Copy link
Contributor Author

@evan-hughes, Thank you for reviewing it. I changed it.

Copy link
Collaborator

@evan-hughes evan-hughes left a comment

Choose a reason for hiding this comment

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

It looks like other examples have a copyright in the main.js, e.g. the mPulse currency converter.

Please add a copyright statement in the main.js.

@hikaneko
Copy link
Contributor Author

A copyright statement is added.

Copy link
Collaborator

@evan-hughes evan-hughes left a comment

Choose a reason for hiding this comment

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

Looks good! Thanks for putting that together!

@lperra lperra merged commit b087782 into akamai:master Oct 21, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Development

Successfully merging this pull request may close these issues.

3 participants