#!/bin/bash
# HEAD method for cross-origin resource sharing (CORS)

source sparql.sh

uriescape "SELECT * WHERE { ?x ?y ?z . }";
curl -s -D- -o/dev/null -I \
    -H "Accept: text/plain" \
    -H "Origin: http://example.org" \
    "$EPR/sparql/?query=$escaped" \
    | egrep -i "Access-Control-Allow-Origin"
