From 9902a43e94a0684caeac8d6e04cdeb47ab478c7d Mon Sep 17 00:00:00 2001 From: opi Date: Tue, 29 Dec 2015 15:59:03 +0100 Subject: [PATCH] Allow CORS request for /test/:subdomain route. --- dynette.rb | 1 + 1 file changed, 1 insertion(+) diff --git a/dynette.rb b/dynette.rb index a23ae48..56eab9c 100755 --- a/dynette.rb +++ b/dynette.rb @@ -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