Commit 3f5e397622f607b3c02e41559ac221dc656ce682

Authored by Braulio Bhavamitra
2 parents a02ded99 e51453fd

Merge branch 'ai3029' into 'master'

Allow Access-Control-Allow-Credentials in Access-Control-Allow-Origin

http://noosfero.org/Development/ActionItem3029

See merge request !129
Showing 1 changed file with 1 additions and 0 deletions   Show diff stats
app/controllers/application_controller.rb
@@ -28,6 +28,7 @@ class ApplicationController < ActionController::Base @@ -28,6 +28,7 @@ class ApplicationController < ActionController::Base
28 unless environment.access_control_allow_methods.blank? 28 unless environment.access_control_allow_methods.blank?
29 response.headers["Access-Control-Allow-Methods"] = environment.access_control_allow_methods 29 response.headers["Access-Control-Allow-Methods"] = environment.access_control_allow_methods
30 end 30 end
  31 + response.headers["Access-Control-Allow-Credentials"] = 'true'
31 elsif environment.restrict_to_access_control_origins 32 elsif environment.restrict_to_access_control_origins
32 render_access_denied _('Origin not in allowed.') 33 render_access_denied _('Origin not in allowed.')
33 end 34 end