What is the cause of a ActionController::InvalidCrossOriginRequest exception on opening theme custom JS file URL

RogerMarley
Community Member

I have set up a production instance of CanvasLMS, and I'm trying to create a theme that includes custom JS and CSS.

However, the theme cannot load the JS.

When I go directly to the URL of the JS file, i.e. https://canvas1.mydomain.com/accounts/3/files/11/download?verifier=V8EmGScOcPPm5iXmzAhR7zC1xTjt5Jo86... , I'm getting a 422 error in the console, and it doesn't show the JS. But there's no problem accessing the CSS file in the same way.

For test purposes, this JS file only contains a single line of code: a console.log() call.

I also have a development instance, which is based on the docker-compose setup provided in the repo. It has no such problem, and I can open the JS link fine.

On reading other related problems around Canvas 422 errors, it seems this is typically caused by different origins. But this isn't the case here -- the JS file is being supplied from the same domain. So I'm at a loss what's wrong.

Below is the full error log output (in log/production.log) after accessing the aforementioned files/.../download? link. Does anyone have any hints what might be wrong?

[01e5c8cd8f36a9cbc25a185fd785fcf1 46ba59ec-9f8a-42af-97fe-9cf824294a66] Started GET "/accounts/3/files/11/download?verifier=V8EmGScOcPPm5iXmzAhR7zC1xTjt5Jo86DeUlcDz" for xxx.xxx.xxx.xxx at 2024-02-24 06:35:32 +0000
[01e5c8cd8f36a9cbc25a185fd785fcf1 46ba59ec-9f8a-42af-97fe-9cf824294a66] SQL PluginSetting Load (0.4ms) SELECT "plugin_settings".* FROM "public"."plugin_settings" WHERE "plugin_settings"."name" = 'sessions' ORDER BY "plugin_settings"."id" ASC LIMIT 1 [production:1 primary]
[01e5c8cd8f36a9cbc25a185fd785fcf1 46ba59ec-9f8a-42af-97fe-9cf824294a66] Processing by FilesController#show as HTML
[01e5c8cd8f36a9cbc25a185fd785fcf1 46ba59ec-9f8a-42af-97fe-9cf824294a66] Parameters: {"verifier"=>"V8EmGScOcPPm5iXmzAhR7zC1xTjt5Jo86DeUlcDz", "download"=>"1", "account_id"=>"3", "file_id"=>"11"}
[01e5c8cd8f36a9cbc25a185fd785fcf1 46ba59ec-9f8a-42af-97fe-9cf824294a66] SQL SQL (1.0ms) SELECT "pseudonyms"."id" AS t0_r0, "pseudonyms"."user_id" AS t0_r1, "pseudonyms"."account_id" AS t0_r2, "pseudonyms"."workflow_state" AS t0_r3, "pseudonyms"."unique_id" AS t0_r4, "pseudonyms"."crypted_password" AS t0_r5, "pseudonyms"."password_salt" AS t0_r6, "pseudonyms"."persistence_token" AS t0_r7, "pseudonyms"."single_access_token" AS t0_r8, "pseudonyms"."perishable_token" AS t0_r9, "pseudonyms"."login_count" AS t0_r10, "pseudonyms"."failed_login_count" AS t0_r11, "pseudonyms"."last_request_at" AS t0_r12, "pseudonyms"."last_login_at" AS t0_r13, "pseudonyms"."current_login_at" AS t0_r14, "pseudonyms"."last_login_ip" AS t0_r15, "pseudonyms"."current_login_ip" AS t0_r16, "pseudonyms"."reset_password_token" AS t0_r17, "pseudonyms"."position" AS t0_r18, "pseudonyms"."created_at" AS t0_r19, "pseudonyms"."updated_at" AS t0_r20, "pseudonyms"."password_auto_generated" AS t0_r21, "pseudonyms"."deleted_at" AS t0_r22, "pseudonyms"."sis_batch_id" AS t0_r23, "pseudonyms"."sis_user_id" AS t0_r24, "pseudonyms"."sis_ssha" AS t0_r25, "pseudonyms"."communication_channel_id" AS t0_r26, "pseudonyms"."sis_communication_channel_id" AS t0_r27, "pseudonyms"."stuck_sis_fields" AS t0_r28, "pseudonyms"."integration_id" AS t0_r29, "pseudonyms"."authentication_provider_id" AS t0_r30, "pseudonyms"."declared_user_type" AS t0_r31, "users"."id" AS t1_r0, "users"."name" AS t1_r1, "users"."sortable_name" AS t1_r2, "users"."workflow_state" AS t1_r3, "users"."time_zone" AS t1_r4, "users"."uuid" AS t1_r5, "users"."created_at" AS t1_r6, "users"."updated_at" AS t1_r7, "users"."avatar_image_url" AS t1_r8, "users"."avatar_image_source" AS t1_r9, "users"."avatar_image_updated_at" AS t1_r10, "users"."phone" AS t1_r11, "users"."school_name" AS t1_r12, "users"."school_position" AS t1_r13, "users"."short_name" AS t1_r14, "users"."deleted_at" AS t1_r15, "users"."show_user_services" AS t1_r16, "users"."page_views_count" AS t1_r17, "users"."reminder_time_for_due_dates" AS t1_r18, "users"."reminder_time_for_grading" AS t1_r19, "users"."storage_quota" AS t1_r20, "users"."visible_inbox_types" AS t1_r21, "users"."last_user_note" AS t1_r22, "users"."subscribe_to_emails" AS t1_r23, "users"."features_used" AS t1_r24, "users"."preferences" AS t1_r25, "users"."avatar_state" AS t1_r26, "users"."locale" AS t1_r27, "users"."browser_locale" AS t1_r28, "users"."unread_conversations_count" AS t1_r29, "users"."stuck_sis_fields" AS t1_r30, "users"."public" AS t1_r31, "users"."otp_secret_key_enc" AS t1_r32, "users"."otp_secret_key_salt" AS t1_r33, "users"."otp_communication_channel_id" AS t1_r34, "users"."initial_enrollment_type" AS t1_r35, "users"."crocodoc_id" AS t1_r36, "users"."last_logged_out" AS t1_r37, "users"."lti_context_id" AS t1_r38, "users"."turnitin_id" AS t1_r39, "users"."lti_id" AS t1_r40, "users"."pronouns" AS t1_r41, "users"."root_account_ids" AS t1_r42, "users"."merged_into_user_id" AS t1_r43 FROM "public"."pseudonyms" LEFT OUTER JOIN "public"."users" ON "users"."id" = "pseudonyms"."user_id" WHERE "pseudonyms"."id" = 1 LIMIT 1 [production:1 primary]
[01e5c8cd8f36a9cbc25a185fd785fcf1 46ba59ec-9f8a-42af-97fe-9cf824294a66] [AUTH] Approved Authlogic session
[01e5c8cd8f36a9cbc25a185fd785fcf1 46ba59ec-9f8a-42af-97fe-9cf824294a66] [AUTH] inital load: pseud -> 1, user -> 1
[01e5c8cd8f36a9cbc25a185fd785fcf1 46ba59ec-9f8a-42af-97fe-9cf824294a66] [AUTH] final user: 1
[01e5c8cd8f36a9cbc25a185fd785fcf1 46ba59ec-9f8a-42af-97fe-9cf824294a66] SQL Account Load (1.9ms) SELECT "accounts".* FROM "public"."accounts" WHERE (accounts.workflow_state<>'deleted') AND "accounts"."id" = 3 ORDER BY "accounts"."id" ASC LIMIT 1 [production:1 secondary]
[01e5c8cd8f36a9cbc25a185fd785fcf1 46ba59ec-9f8a-42af-97fe-9cf824294a66] SQL AccountUser Load (0.7ms) SELECT "account_users".* FROM "public"."account_users" WHERE "account_users"."account_id" = 3 AND "account_users"."workflow_state" != 'deleted' AND "account_users"."user_id" = 1 ORDER BY "account_users"."id" ASC LIMIT 1 [production:1 secondary]
[01e5c8cd8f36a9cbc25a185fd785fcf1 46ba59ec-9f8a-42af-97fe-9cf824294a66] SQL Account Load (1.7ms) WITH RECURSIVE t AS ( SELECT * FROM "public"."accounts" WHERE id=1 UNION SELECT accounts.* FROM "public"."accounts" INNER JOIN t ON accounts.id=t.parent_account_id ) SELECT * FROM t [production:1 secondary]
[01e5c8cd8f36a9cbc25a185fd785fcf1 46ba59ec-9f8a-42af-97fe-9cf824294a66] SQL AccountUser Load (0.4ms) SELECT "account_users".* FROM "public"."account_users" WHERE "account_users"."account_id" IN (3, 1, 2) AND "account_users"."user_id" = 1 AND "account_users"."workflow_state" != 'deleted' [production:1 secondary]
[01e5c8cd8f36a9cbc25a185fd785fcf1 46ba59ec-9f8a-42af-97fe-9cf824294a66] SQL AccountUser Load (0.4ms) SELECT "account_users".* FROM "public"."account_users" WHERE "account_users"."account_id" IN (1, 2) AND "account_users"."user_id" = 1 AND "account_users"."workflow_state" != 'deleted' [production:1 secondary]
[01e5c8cd8f36a9cbc25a185fd785fcf1 46ba59ec-9f8a-42af-97fe-9cf824294a66] SQL Attachment Load (1.5ms) SELECT "attachments".* FROM "public"."attachments" WHERE "attachments"."context_id" = 3 AND "attachments"."context_type" = 'Account' AND "attachments"."id" = 11 LIMIT 1 [production:1 secondary]
[01e5c8cd8f36a9cbc25a185fd785fcf1 46ba59ec-9f8a-42af-97fe-9cf824294a66] SQL Account Load (0.6ms) SELECT "accounts".* FROM "public"."accounts" WHERE "accounts"."id" = 3 LIMIT 1 [production:1 secondary]
[01e5c8cd8f36a9cbc25a185fd785fcf1 46ba59ec-9f8a-42af-97fe-9cf824294a66] SQL Account Load (0.7ms) SELECT "accounts".* FROM "public"."accounts" WHERE "accounts"."id" = 1 LIMIT 1 [production:1 secondary]
[01e5c8cd8f36a9cbc25a185fd785fcf1 46ba59ec-9f8a-42af-97fe-9cf824294a66] SQL ContentTag Load (1.0ms) SELECT "content_tags".* FROM "public"."content_tags" WHERE "content_tags"."content_id" = 11 AND "content_tags"."content_type" = 'Attachment' AND (content_tags.tag_type='context_module' AND content_tags.workflow_state<>'deleted') [production:1 secondary]
[01e5c8cd8f36a9cbc25a185fd785fcf1 46ba59ec-9f8a-42af-97fe-9cf824294a66] setup_live_events_context (1.1ms)
[01e5c8cd8f36a9cbc25a185fd785fcf1 46ba59ec-9f8a-42af-97fe-9cf824294a66] SQL FeatureFlag Load (0.6ms) SELECT "feature_flags".* FROM "public"."feature_flags" WHERE "feature_flags"."feature" = 'javascript_csp' AND "feature_flags"."context_type" = 'Account' AND "feature_flags"."context_id" = 1 ORDER BY "feature_flags"."id" ASC LIMIT 1 [production:1 secondary]
[01e5c8cd8f36a9cbc25a185fd785fcf1 46ba59ec-9f8a-42af-97fe-9cf824294a66] Sent file /var/canvas/tmp/files/0000/0011/test.js (0.4ms)
[01e5c8cd8f36a9cbc25a185fd785fcf1 46ba59ec-9f8a-42af-97fe-9cf824294a66] Security warning: an embedded <script> tag on another site requested protected JavaScript. If you know what you're doing, go ahead and disable forgery protection on this action to permit cross-origin JavaScript embedding.
[01e5c8cd8f36a9cbc25a185fd785fcf1 46ba59ec-9f8a-42af-97fe-9cf824294a66]

[CANVAS_ERRORS] EXCEPTION LOG
ActionController::InvalidCrossOriginRequest (Security warning: an embedded <script> tag on another site requested protected JavaScript. If you know what you're doing, go ahead and disable forgery protection on this action to permit cross-origin JavaScript embedding.):
/var/canvas/vendor/bundle/ruby/3.1.0/gems/actionpack-7.0.8/lib/action_controller/metal/request_forgery_protection.rb:313:in `verify_same_origin_request'
/var/canvas/vendor/bundle/ruby/3.1.0/gems/activesupport-7.0.8/lib/active_support/callbacks.rb:400:in `block in make_lambda'
/var/canvas/vendor/bundle/ruby/3.1.0/gems/activesupport-7.0.8/lib/active_support/callbacks.rb:247:in `block in halting'
/var/canvas/vendor/bundle/ruby/3.1.0/gems/activesupport-7.0.8/lib/active_support/callbacks.rb:599:in `block in invoke_after'
/var/canvas/vendor/bundle/ruby/3.1.0/gems/activesupport-7.0.8/lib/active_support/callbacks.rb:599:in `each'
/var/canvas/vendor/bundle/ruby/3.1.0/gems/activesupport-7.0.8/lib/active_support/callbacks.rb:599:in `invoke_after'
/var/canvas/vendor/bundle/ruby/3.1.0/gems/activesupport-7.0.8/lib/active_support/callbacks.rb:132:in `block in run_callbacks'
/var/canvas/app/controllers/application_controller.rb:3073:in `manage_live_events_context'
/var/canvas/vendor/bundle/ruby/3.1.0/gems/activesupport-7.0.8/lib/active_support/callbacks.rb:127:in `block in run_callbacks'
/var/canvas/app/controllers/application_controller.rb:789:in `compute_http_cost'
/var/canvas/vendor/bundle/ruby/3.1.0/gems/activesupport-7.0.8/lib/active_support/callbacks.rb:127:in `block in run_callbacks'
/var/canvas/vendor/bundle/ruby/3.1.0/gems/inst_statsd-3.0.4/lib/inst_statsd/statsd.rb:102:in `batch'
/var/canvas/app/controllers/application_controller.rb:784:in `batch_statsd'
/var/canvas/vendor/bundle/ruby/3.1.0/gems/activesupport-7.0.8/lib/active_support/callbacks.rb:127:in `block in run_callbacks'
/var/canvas/lib/base/temp_cache.rb:30:in `enable'
/var/canvas/app/controllers/application_controller.rb:780:in `enable_request_cache'
/var/canvas/vendor/bundle/ruby/3.1.0/gems/activesupport-7.0.8/lib/active_support/callbacks.rb:127:in `block in run_callbacks'
/var/canvas/app/controllers/application_controller.rb:776:in `set_timezone'
/var/canvas/vendor/bundle/ruby/3.1.0/gems/activesupport-7.0.8/lib/active_support/callbacks.rb:127:in `block in run_callbacks'
/var/canvas/app/controllers/application_controller.rb:766:in `set_locale'
/var/canvas/vendor/bundle/ruby/3.1.0/gems/activesupport-7.0.8/lib/active_support/callbacks.rb:127:in `block in run_callbacks'
/var/canvas/vendor/bundle/ruby/3.1.0/gems/sentry-rails-5.12.0/lib/sentry/rails/controller_transaction.rb:28:in `block in sentry_around_action'
/var/canvas/vendor/bundle/ruby/3.1.0/gems/sentry-ruby-5.12.0/lib/sentry/hub.rb:102:in `with_child_span'
/var/canvas/vendor/bundle/ruby/3.1.0/gems/sentry-ruby-5.12.0/lib/sentry-ruby.rb:476:in `with_child_span'
/var/canvas/vendor/bundle/ruby/3.1.0/gems/sentry-rails-5.12.0/lib/sentry/rails/controller_transaction.rb:14:in `sentry_around_action'
/var/canvas/vendor/bundle/ruby/3.1.0/gems/activesupport-7.0.8/lib/active_support/callbacks.rb:127:in `block in run_callbacks'
/var/canvas/vendor/bundle/ruby/3.1.0/gems/activesupport-7.0.8/lib/active_support/callbacks.rb:138:in `run_callbacks'
/var/canvas/vendor/bundle/ruby/3.1.0/gems/actionpack-7.0.8/lib/abstract_controller/callbacks.rb:233:in `process_action'
/var/canvas/vendor/bundle/ruby/3.1.0/gems/actionpack-7.0.8/lib/action_controller/metal/rescue.rb:23:in `process_action'
/var/canvas/vendor/bundle/ruby/3.1.0/gems/actionpack-7.0.8/lib/action_controller/metal/instrumentation.rb:67:in `block in process_action'
/var/canvas/vendor/bundle/ruby/3.1.0/gems/activesupport-7.0.8/lib/active_support/notifications.rb:206:in `block in instrument'
/var/canvas/vendor/bundle/ruby/3.1.0/gems/activesupport-7.0.8/lib/active_support/notifications/instrumenter.rb:24:in `instrument'
/var/canvas/vendor/bundle/ruby/3.1.0/gems/activesupport-7.0.8/lib/active_support/notifications.rb:206:in `instrument'
/var/canvas/vendor/bundle/ruby/3.1.0/gems/actionpack-7.0.8/lib/action_controller/metal/instrumentation.rb:66:in `process_action'
/var/canvas/vendor/bundle/ruby/3.1.0/gems/actionpack-7.0.8/lib/action_controller/metal/params_wrapper.rb:259:in `process_action'
/var/canvas/vendor/bundle/ruby/3.1.0/gems/activerecord-7.0.8/lib/active_record/railties/controller_runtime.rb:27:in `process_action'
/var/canvas/vendor/bundle/ruby/3.1.0/gems/actionpack-7.0.8/lib/abstract_controller/base.rb:151:in `process'
/var/canvas/vendor/bundle/ruby/3.1.0/gems/actionview-7.0.8/lib/action_view/rendering.rb:39:in `process'
/var/canvas/vendor/bundle/ruby/3.1.0/gems/actionpack-7.0.8/lib/action_controller/metal.rb:188:in `dispatch'
/var/canvas/vendor/bundle/ruby/3.1.0/gems/actionpack-7.0.8/lib/action_controller/metal.rb:251:in `dispatch'
/var/canvas/vendor/bundle/ruby/3.1.0/gems/actionpack-7.0.8/lib/action_dispatch/routing/route_set.rb:49:in `dispatch'
/var/canvas/vendor/bundle/ruby/3.1.0/gems/actionpack-7.0.8/lib/action_dispatch/routing/route_set.rb:32:in `serve'
/var/canvas/vendor/bundle/ruby/3.1.0/gems/actionpack-7.0.8/lib/action_dispatch/journey/router.rb:50:in `block in serve'
/var/canvas/vendor/bundle/ruby/3.1.0/gems/actionpack-7.0.8/lib/action_dispatch/journey/router.rb:32:in `each'
/var/canvas/vendor/bundle/ruby/3.1.0/gems/actionpack-7.0.8/lib/action_dispatch/journey/router.rb:32:in `serve'
/var/canvas/vendor/bundle/ruby/3.1.0/gems/actionpack-7.0.8/lib/action_dispatch/routing/route_set.rb:852:in `call'
/var/canvas/gems/plugins/respondus_soap_endpoint/lib/respondus_soap_endpoint/middleware.rb:80:in `call'
/var/canvas/vendor/bundle/ruby/3.1.0/gems/rack-brotli-1.2.0/lib/rack/brotli/deflater.rb:34:in `call'
/var/canvas/vendor/bundle/ruby/3.1.0/gems/rack-2.2.8/lib/rack/deflater.rb:44:in `call'
/var/canvas/vendor/bundle/ruby/3.1.0/gems/rack-2.2.8/lib/rack/chunked.rb:98:in `call'
/var/canvas/vendor/bundle/ruby/3.1.0/gems/rack-2.2.8/lib/rack/tempfile_reaper.rb:15:in `call'
/var/canvas/vendor/bundle/ruby/3.1.0/gems/rack-2.2.8/lib/rack/etag.rb:27:in `call'
/var/canvas/vendor/bundle/ruby/3.1.0/gems/rack-2.2.8/lib/rack/conditional_get.rb:27:in `call'
/var/canvas/vendor/bundle/ruby/3.1.0/gems/rack-2.2.8/lib/rack/head.rb:12:in `call'
/var/canvas/app/middleware/request_throttle.rb:70:in `block in call'
/var/canvas/app/middleware/request_throttle.rb:375:in `reserve_capacity'
/var/canvas/app/middleware/request_throttle.rb:68:in `call'
/var/canvas/vendor/bundle/ruby/3.1.0/gems/actionpack-7.0.8/lib/action_dispatch/http/permissions_policy.rb:38:in `call'
/var/canvas/vendor/bundle/ruby/3.1.0/gems/actionpack-7.0.8/lib/action_dispatch/http/content_security_policy.rb:36:in `call'
/var/canvas/gems/request_context/lib/request_context/session.rb:28:in `call'
/var/canvas/vendor/bundle/ruby/3.1.0/gems/rack-2.2.8/lib/rack/session/abstract/id.rb:266:in `context'
/var/canvas/vendor/bundle/ruby/3.1.0/gems/rack-2.2.8/lib/rack/session/abstract/id.rb:260:in `call'
/var/canvas/app/middleware/load_account.rb:49:in `call'
/var/canvas/vendor/bundle/ruby/3.1.0/gems/actionpack-7.0.8/lib/action_dispatch/middleware/cookies.rb:704:in `call'
/var/canvas/vendor/bundle/ruby/3.1.0/gems/actionpack-7.0.8/lib/action_dispatch/middleware/callbacks.rb:27:in `block in call'
/var/canvas/vendor/bundle/ruby/3.1.0/gems/activesupport-7.0.8/lib/active_support/callbacks.rb:99:in `run_callbacks'
/var/canvas/vendor/bundle/ruby/3.1.0/gems/actionpack-7.0.8/lib/action_dispatch/middleware/callbacks.rb:26:in `call'
/var/canvas/vendor/bundle/ruby/3.1.0/gems/sentry-rails-5.12.0/lib/sentry/rails/rescued_exception_interceptor.rb:12:in `call'
/var/canvas/vendor/bundle/ruby/3.1.0/gems/actionpack-7.0.8/lib/action_dispatch/middleware/debug_exceptions.rb:28:in `call'
/var/canvas/vendor/bundle/ruby/3.1.0/gems/sentry-ruby-5.12.0/lib/sentry/rack/capture_exceptions.rb:28:in `block (2 levels) in call'
/var/canvas/vendor/bundle/ruby/3.1.0/gems/sentry-ruby-5.12.0/lib/sentry/hub.rb:251:in `with_session_tracking'
/var/canvas/vendor/bundle/ruby/3.1.0/gems/sentry-ruby-5.12.0/lib/sentry-ruby.rb:387:in `with_session_tracking'
/var/canvas/vendor/bundle/ruby/3.1.0/gems/sentry-ruby-5.12.0/lib/sentry/rack/capture_exceptions.rb:19:in `block in call'
/var/canvas/vendor/bundle/ruby/3.1.0/gems/sentry-ruby-5.12.0/lib/sentry/hub.rb:59:in `with_scope'
/var/canvas/vendor/bundle/ruby/3.1.0/gems/sentry-ruby-5.12.0/lib/sentry-ruby.rb:367:in `with_scope'
/var/canvas/vendor/bundle/ruby/3.1.0/gems/sentry-ruby-5.12.0/lib/sentry/rack/capture_exceptions.rb:18:in `call'
/var/canvas/app/middleware/sentry_trace_scrubber.rb:34:in `call'
/var/canvas/vendor/bundle/ruby/3.1.0/gems/actionpack-7.0.8/lib/action_dispatch/middleware/show_exceptions.rb:29:in `call'
/var/canvas/vendor/bundle/ruby/3.1.0/gems/railties-7.0.8/lib/rails/rack/logger.rb:40:in `call_app'
/var/canvas/vendor/bundle/ruby/3.1.0/gems/railties-7.0.8/lib/rails/rack/logger.rb:27:in `call'
/var/canvas/vendor/bundle/ruby/3.1.0/gems/actionpack-7.0.8/lib/action_dispatch/middleware/remote_ip.rb:93:in `call'
/var/canvas/vendor/bundle/ruby/3.1.0/gems/request_store-1.5.1/lib/request_store/middleware.rb:19:in `call'
/var/canvas/gems/request_context/lib/request_context/generator.rb:71:in `call'
/var/canvas/vendor/bundle/ruby/3.1.0/gems/rack-2.2.8/lib/rack/method_override.rb:24:in `call'
/var/canvas/app/middleware/prevent_non_multipart_parse.rb:35:in `call'
/var/canvas/vendor/bundle/ruby/3.1.0/gems/rack-2.2.8/lib/rack/runtime.rb:22:in `call'
/var/canvas/vendor/bundle/ruby/3.1.0/gems/actionpack-7.0.8/lib/action_dispatch/middleware/executor.rb:14:in `call'
/var/canvas/vendor/bundle/ruby/3.1.0/gems/rack-2.2.8/lib/rack/sendfile.rb:110:in `call'
/var/canvas/vendor/bundle/ruby/3.1.0/gems/actionpack-7.0.8/lib/action_dispatch/middleware/ssl.rb:77:in `call'
/var/canvas/vendor/bundle/ruby/3.1.0/gems/actionpack-7.0.8/lib/action_dispatch/middleware/host_authorization.rb:131:in `call'
/var/canvas/vendor/bundle/ruby/3.1.0/gems/railties-7.0.8/lib/rails/engine.rb:530:in `call'
/var/canvas/vendor/bundle/ruby/3.1.0/gems/railties-7.0.8/lib/rails/railtie.rb:226:in `public_send'
/var/canvas/vendor/bundle/ruby/3.1.0/gems/railties-7.0.8/lib/rails/railtie.rb:226:in `method_missing'
/usr/lib/ruby/vendor_ruby/phusion_passenger/rack/thread_handler_extension.rb:107:in `process_request'
/usr/lib/ruby/vendor_ruby/phusion_passenger/request_handler/thread_handler.rb:149:in `accept_and_process_next_request'
/usr/lib/ruby/vendor_ruby/phusion_passenger/request_handler/thread_handler.rb:110:in `main_loop'
/usr/lib/ruby/vendor_ruby/phusion_passenger/request_handler.rb:419:in `block (3 levels) in start_threads'
/usr/lib/ruby/vendor_ruby/phusion_passenger/utils.rb:113:in `block in create_thread_and_abort_on_exception'CONTEXT: {:tags=>{"inst.team"=>"unknown", :account_id=>10000000000001, :user_id=>10000000000001, :type=>nil, :response_code=>422}, :extra=>{:request_id=>"46ba59ec-9f8a-42af-97fe-9cf824294a66", :session_id=>"01e5c8cd8f36a9cbc25a185fd785fcf1", :meta_headers=>"o=files;n=show;t=Account;i=3;", :request_context_id=>"46ba59ec-9f8a-42af-97fe-9cf824294a66", :request_method=>:get, :format=>#<Mime::Type:0x00007f61b7920480 @synonyms=["application/xhtml+xml"], @symbol=:html, @string="text/html", @hash=-3597961454566420948>, "HTTP_ACCEPT"=>"text/html,application/xhtml+xml,application/xml;q=0.9,image/avif,image/webp,image/apng,*/*;q=0.8,application/signed-exchange;v=b3;q=0.7", "HTTP_ACCEPT_ENCODING"=>"gzip, deflate, br", "HTTP_HOST"=>"canvas1.mydomain.com", "HTTP_USER_AGENT"=>"Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/121.0.0.0 Safari/537.36", "PATH_INFO"=>"/accounts/3/files/11/download", "QUERY_STRING"=>"?verifier=V8EmGScOcPPm5iXmzAhR7zC1xTjt5Jo86DeUlcDz", "REQUEST_METHOD"=>"GET", "REQUEST_URI"=>"https://canvas1.mydomain.com/accounts/3/files/11/download?verifier=V8EmGScOcPPm5iXmzAhR7zC1xTjt5Jo86DeUlcDz", "SERVER_NAME"=>"canvas1.mydomain.com", "SERVER_PORT"=>"443", "SERVER_PROTOCOL"=>"HTTP/1.1", "REMOTE_ADDR"=>"xxx.xxx.xxx.xxx", "path_parameters"=>"{:download=>\"1\", :controller=>\"files\", :action=>\"show\", :account_id=>\"3\", :file_id=>\"11\"}", "query_parameters"=>"{\"verifier\"=>\"V8EmGScOcPPm5iXmzAhR7zC1xTjt5Jo86DeUlcDz\"}", "request_parameters"=>"{}", :user_agent=>"Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/121.0.0.0 Safari/537.36"}}

 

Labels (5)
0 Likes