Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #!/bin/sh
- # Set CORS headers
- echo "Access-Control-Allow-Origin: *"
- echo "Access-Control-Allow-Methods: GET, POST, OPTIONS"
- echo "Access-Control-Allow-Headers: Content-Type"
- # Get path after /proxy.cgi
- PATH_INFO=$(echo "$REQUEST_URI" | sed 's|^/proxy.cgi||')
- # Set content type
- echo "Content-Type: application/octet-stream"
- echo ""
- # Proxy the request
- wget -q -O - "http://127.0.0.1:5000${PATH_INFO}"
Advertisement
Add Comment
Please, Sign In to add comment