BUG: minor, do not send access origin if not set

This commit is contained in:
Sam 2015-02-17 09:54:45 +11:00
parent 8d56aa12e9
commit 6c09b6739d

View File

@ -90,7 +90,7 @@ class StaticController < ApplicationController
expires_in 1.year, public: true
response.headers["Expires"] = 1.year.from_now.httpdate
response.headers["Access-Control-Allow-Origin"] = params[:origin]
response.headers["Access-Control-Allow-Origin"] = params[:origin] if params[:origin]
begin
response.headers["Last-Modified"] = File.ctime(path).httpdate