l radio news: remove duplicate CORS headers
This commit is contained in:
parent
1c02415b6e
commit
d9b09371ec
@ -104,8 +104,6 @@ in
|
||||
case "''${Method:-GET} $Request_URI" in
|
||||
"GET /")
|
||||
printf 'HTTP/1.1 200 OK\r\n'
|
||||
printf 'Access-Control-Allow-Origin: *\r\n';
|
||||
printf 'Access-Control-Allow-Methods: GET, POST, OPTIONS\r\n';
|
||||
printf 'Connection: close\r\n'
|
||||
printf '\r\n'
|
||||
cat "$HOME"/news | jq -sc .
|
||||
@ -116,8 +114,6 @@ in
|
||||
echo "$payload" | jq 'has("from") and has("to") and has("text")' >&2
|
||||
echo "$payload" | jq -c '{ from: (.from | fromdate | todate), to: (.to | fromdate | todate), text: .text }' >> "$HOME"/news
|
||||
printf 'HTTP/1.1 200 OK\r\n'
|
||||
printf 'Access-Control-Allow-Origin: *\r\n';
|
||||
printf 'Access-Control-Allow-Methods: GET, POST, OPTIONS\r\n';
|
||||
printf 'Connection: close\r\n'
|
||||
printf '\r\n'
|
||||
exit
|
||||
|
Loading…
Reference in New Issue
Block a user