Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- async function handler(event) {
- const response = event.response;
- const headers = response.headers;
- // Set HTTP security headers according to your errors (try wildcards * because YOLO)
- headers['content-security-policy'] = { value: "default-src 'none'; img-src 'self' data: https:; script-src 'self'; style-src 'unsafe-inline'; object-src 'none'; frame-ancestors 'none'; script-src-elem 'self' 'unsafe-inline' https://www.googletagmanager.com https://cdn.jsdelivr.net https://cdnjs.cloudflare.com; font-src 'self'; style-src-elem 'self' 'unsafe-inline' https://xnewworlds.jatg.co; media-src *"}
- // Return the response to viewers
- return response;
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement