mirror of
https://github.com/tgorordo/smithy.git
synced 2026-06-05 16:22:15 -07:00
allow source inspection of cgi script
This commit is contained in:
parent
47de09c59c
commit
84d6380081
1 changed files with 11 additions and 1 deletions
|
|
@ -1,5 +1,15 @@
|
|||
#!/usr/bin/bash
|
||||
#!/usr/bin/env bash
|
||||
|
||||
SCRIPT_DIR="$(cd "$(dirname "$0")" && pwd)"
|
||||
|
||||
if [[ "$QUERY_STRING" == "source" ]]; then
|
||||
|
||||
echo "Content-Type: text/plain"
|
||||
echo
|
||||
echo "<pre>"
|
||||
sed 's/&/\&/g; s/</\</g; s/>/\>/g' "$0"
|
||||
echo "</pre>"
|
||||
exit 0
|
||||
fi
|
||||
|
||||
exec "$SCRIPT_DIR/../../.venv/bin/python" "$SCRIPT_DIR/script.py"
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue