SHARE
TWEET

Untitled

a guest May 19th, 2019 71 Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. 'use strict';
  2.  
  3. exports.handler = (event, context, callback) => {
  4.     const response = event.Records[0].cf.response;
  5.     const headers = response.headers;
  6.  
  7.     headers['test-header'] = [{
  8.         key: 'test-header',
  9.         value: event.Records[0].cf.request.querystring
  10.     }];
  11.    
  12.  
  13.     callback(null, response);
  14. };
RAW Paste Data
We use cookies for various purposes including analytics. By continuing to use Pastebin, you agree to our use of cookies as described in the Cookies Policy. OK, I Understand
Not a member of Pastebin yet?
Sign Up, it unlocks many cool features!
 
Top