Skip to content

Commit b4e7ff3

Browse files
author
Robert Mosolgo
authored
Merge pull request rmosolgo#2557 from daemonsy/protect_from_forgery
Comment out protect from forgery code, let the consumer opt in
2 parents a22d04f + a1a4b15 commit b4e7ff3

File tree

2 files changed

+2
-2
lines changed

2 files changed

+2
-2
lines changed

lib/generators/graphql/templates/graphql_controller.erb

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@ class GraphqlController < ApplicationController
22
# If accessing from outside this domain, nullify the session
33
# This allows for outside API access while preventing CSRF attacks,
44
# but you'll have to authenticate your user separately
5-
protect_from_forgery with: :null_session
5+
# protect_from_forgery with: :null_session
66

77
def execute
88
variables = ensure_hash(params[:variables])

spec/integration/rails/generators/graphql/install_generator_spec.rb

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -179,7 +179,7 @@ class GraphqlController < ApplicationController
179179
# If accessing from outside this domain, nullify the session
180180
# This allows for outside API access while preventing CSRF attacks,
181181
# but you'll have to authenticate your user separately
182-
protect_from_forgery with: :null_session
182+
# protect_from_forgery with: :null_session
183183
184184
def execute
185185
variables = ensure_hash(params[:variables])

0 commit comments

Comments
 (0)