-
Notifications
You must be signed in to change notification settings - Fork 456
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
fix: allow course import from Course Authoring MFE #1063
Conversation
This commit removes the CORS_ALLOW_HEADERS setting from the LMS/Studio config template. This is set separately by LMS and Studio config files in edx-platform and should not be overridden by Tutor, since the header types to allow is application logic and will not vary between sites. This fixes a bug where course import in Studio using the new Course Authoring MFE was broken in Tutor deployments because it required additional headers to be allowed (content-range and content-disposition). This had been set correctly in edx-platform, but was being overridden by Tutor.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Indeed, setting this here only makes it so we have to keep tabs on upstream and update it when it does. I don't see the point of doing so, so I vote for removing it.
For historical context, it looks like we added this override here: #743 (review) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think this might break in tutor local
mode. Conversation ongoing in Slack, I'll paste a summary here after.
I suspect that:
So, @ormsbee will fix upstream production.py to set CORS_ALLOW_HEADERS unconditionally, which will allow us to remove the extra override here |
Thanks @kdmccormick! Blocked on openedx/edx-platform#34743 |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Using tutor local run lms/cms ./manage.py lms/cms print_setting CORS_ALLOW_HEADERS
, I confirmed my suspicion that we needed to override CORS_ALLOW_HEADERS here, and I also confirmed that Dave's edx-platform PR removes the need for us to override it. LGTM pending the upstream PR 👍🏻
This commit removes the
CORS_ALLOW_HEADERS
setting from the LMS/Studio config template. This is set separately by LMS and Studio config files in edx-platform and should not be overridden by Tutor, since the header types to allow is application logic and will not vary between sites. This fixes a bug where course import in Studio using the new Course Authoring MFE was broken in Tutor deployments because it required additional headers to be allowed (content-range
andcontent-disposition
). This had been set correctly in edx-platform, but was being overridden by Tutor.