Allow CORS request for /test/:subdomain route.

This commit is contained in:
opi 2015-12-29 15:59:03 +01:00
parent 362dffaa84
commit 9902a43e94

View file

@ -103,6 +103,7 @@ get '/domains' do
end
get '/test/:subdomain' do
headers['Access-Control-Allow-Origin'] = '*'
if entry = Entry.first(:subdomain => params[:subdomain])
halt 409, { :error => "Subdomain already taken: #{entry.subdomain}" }.to_json
else