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

Use EncodeUri() if part of the URL path or EncodeUriComponent() if used as a URL parameter #1

Open
philpott opened this issue Nov 9, 2021 · 1 comment

Comments

@philpott
Copy link

philpott commented Nov 9, 2021

const scriptDomain = data.forwardingDomain || 'cdn.trackjs.com';

When reviewing your template we've noticed that it is using parameters to build a url. It's a best practice to use EncodeUri() if part of the URL path or EncodeUriComponent() if used as a URL parameter.

@alexminza
Copy link
Owner

alexminza commented Nov 10, 2021

const scriptUrl = 'https://' + scriptDomain + '/agent/v3/latest/t.js';

Only scriptDomain is used as the URI host - for the Domain Forwarding feature in TrackJS.

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

No branches or pull requests

2 participants