Assuming that your OSRM Service is running on the default port: 5000.
Format:
| ##FILE SPACING: | |
| # double space a file | |
| sed G | |
| # double space a file which already has blank lines in it. Output file | |
| # should contain no more than one blank line between lines of text. | |
| sed '/^$/d;G' | |
| # triple space a file |
| # Look for client IP in the X-Forwarded-For header | |
| real_ip_header X-Forwarded-For; | |
| # Ignore trusted IPs | |
| real_ip_recursive on; | |
| # Set VPC subnet as trusted | |
| set_real_ip_from 10.0.0.0/16; | |
| # Set CloudFront subnets as trusted |
Proxy cache passes GET instead of HEAD to upstream... so we have a 403.
This version include these fixes.
| { | |
| 'kyroskoh': {}, | |
| 'sgmy': {}, | |
| 'kkj_9690a': {}, | |
| 'xndlxss': {}, | |
| 'jojo_low': {}, | |
| 'kiaraakitty': {} | |
| } |
| // Based on Glacier's example: http://docs.aws.amazon.com/AWSJavaScriptSDK/guide/examples.html#Amazon_Glacier__Multi-part_Upload | |
| var fs = require('fs'); | |
| var AWS = require('aws-sdk'); | |
| AWS.config.loadFromPath('./aws-config.json'); | |
| var s3 = new AWS.S3(); | |
| // File | |
| var fileName = '5.pdf'; | |
| var filePath = './' + fileName; | |
| var fileKey = fileName; |
| var AWS = require('aws-sdk'), | |
| fs = require('fs'); | |
| // For dev purposes only | |
| AWS.config.update({ accessKeyId: '...', secretAccessKey: '...' }); | |
| // Read in the file, convert it to base64, store to S3 | |
| fs.readFile('del.txt', function (err, data) { | |
| if (err) { throw err; } |
| <!DOCTYPE html> | |
| <html> | |
| <head> | |
| <title>AWS S3 File Upload</title> | |
| <script src="https://sdk.amazonaws.com/js/aws-sdk-2.1.12.min.js"></script> | |
| </head> | |
| <body> | |
| <input type="file" id="file-chooser" /> |