Guest User

Untitled

a guest
Aug 4th, 2025
19
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.41 KB | None | 0 0
  1. #!/bin/sh
  2.  
  3. # Set CORS headers
  4. echo "Access-Control-Allow-Origin: *"
  5. echo "Access-Control-Allow-Methods: GET, POST, OPTIONS"
  6. echo "Access-Control-Allow-Headers: Content-Type"
  7.  
  8. # Get path after /proxy.cgi
  9. PATH_INFO=$(echo "$REQUEST_URI" | sed 's|^/proxy.cgi||')
  10.  
  11. # Set content type
  12. echo "Content-Type: application/octet-stream"
  13. echo ""
  14.  
  15. # Proxy the request
  16. wget -q -O - "http://127.0.0.1:5000${PATH_INFO}"
Advertisement
Add Comment
Please, Sign In to add comment