Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- if (!hostInPathMode) {
- urlRequested = changeURLRequested(urlRequested, getOriginalServerGivenHeaders(request['headers']))
- } else {
- DEBUG&&console.log('urlRequested before is ');
- DEBUG&&console.log(urlRequested);
- urlRequested = getOriginalURLFromPath(urlRequested);
- DEBUG&&console.log('urlRequested after is ');
- DEBUG&&console.log(urlRequested);
- }
- if (lambdaHandlesImageURL(urlRequested)) {
- if (request['headers'].signaturepresent && request['headers'].signatureseparator && request['headers'].signature) {
- urlRequested = urlRequested + request['headers'].signatureseparator + request['headers'].signature;
- DEBUG&&console.log('urlRequested is ', urlRequested);
- }
- }
- if (giveLossyWebpForDesktop(urlRequested)) {
- DEBUG&&console.log('changing device size to s')
- deviceSize = 's';
- }
- const browser = getBrowserKeyFromAcceptHeader(request.headers['accept'])
- const device = getParsedDeviceForDynDB(deviceSize)
- const partitionKey = getDeviceBrowserKey(device, browser)
- updateTTLForItem(partitionKey, urlRequested)
Add Comment
Please, Sign In to add comment