It seems that unlike other browsers Chrome requires that if a form
submission redirects that the redirected URL also match the form-action
policy rather than just requiring the original URL to match.
append_content_security_policy_directives(
:child_src => %w[127.0.0.1:8111 127.0.0.1:8112],
:connect_src => %w[nominatim.openstreetmap.org overpass-api.de router.project-osrm.org valhalla.mapzen.com],
+ :form_action => %w[render.openstreetmap.org],
:script_src => %w[graphhopper.com open.mapquestapi.com],
:img_src => %w[developer.mapquest.com]
)
protected
def oauth1_authorize
+ append_content_security_policy_directives(:form_action => %w[*])
+
if @token.invalidated?
@message = t "oauth.oauthorize_failure.invalid"
render :action => "authorize_failure"
@title = t "user.new.title"
@referer = params[:referer] || session[:referer]
+ append_content_security_policy_directives(
+ :form_action => %w[accounts.google.com *.facebook.com login.live.com github.com meta.wikimedia.org]
+ )
+
if current_user
# The user is logged in already, so don't show them the signup
# page, instead send them to the home page