403 Forbidden from SCORM XBlock's storage.exists() call, crashing course pages under load

Hi all,

We’re seeing an on-and-off 403 Forbidden error from the SCORM XBlock’s storage check, which crashes course outline pages for users. Hoping someone has hit this before.

Environment:

  • tutor 17(quince)
  • Self-hosted MinIO (S3-compatible storage) behind Caddy as reverse proxy
  • openedx-scorm-xblock for SCORM content

The error:

File ".../openedxscorm/scormxblock.py", line 385, in index_page_url
    if self.storage.exists(
File ".../storages/backends/s3.py", line 479, in exists
    self.connection.meta.client.head_object(Bucket=self.bucket_name, Key=name)
botocore.exceptions.ClientError: An error occurred (403) when calling the HeadObject operation: Forbidden

It’s triggered when a course’s BlockStructure cache is cold (log line: BlockStructure: Not found in cache), forcing a full block-tree rebuild. That calls student_view_data() on every block, including SCORM, which proactively checks storage.exists(). Since django-storages re-raises any non-404 ClientError, the 403 becomes an uncaught exception → 500 on /api/course_home/outline/....

Does anyone know about this issue and how we can resolved this ?

Sounds like maybe Caddy is rejecting HEAD requests for those paths. Is that something you’ve already looked into?

I checked on the Caddy side, but I’m not sure what I need to look at. Could you help me?

thing is, when we restart our LMS and CMS, the error disappears, and everything works perfectly. But then, after a few days, we start getting this issue again.