location ~ ^/downloadfile/ {
proxy_pass ...
}
Content-Disposition: attachment;filename=your_pdf.pdf
header('Access-Control-Allow-Origin: ' . $_SERVER['HTTP_ORIGIN']);
SELECT t1.`id`, COALESCE(t2.`index`, t1.`index`) as 'index'
FROM table_1 t1
LEFT JOIN table_2 t2 ON(t1.`id` = t2.`id`);
#!/usr/bin/env bash
for url in `cat urls.txt`; do
curl "$url" -D ./check-head 2>./check-error -o /dev/null
if [ $? == "0" ]; then
res=`head -n 1 ./check-head | awk '{print $2}'`
else
res=`cat ./check-error`
fi
echo $url - $res
done
rm ./check-head ./check-error