From 769748db48cf3a8c6eb934b7bdf2b2273f350b49 Mon Sep 17 00:00:00 2001 From: Manuel Kaufmann Date: Mon, 25 Mar 2024 17:50:46 +0100 Subject: [PATCH 1/2] HTTPheader: add another option Required by https://github.com/readthedocs/readthedocs.org/issues/11223 --- readthedocs/projects/models.py | 1 + 1 file changed, 1 insertion(+) diff --git a/readthedocs/projects/models.py b/readthedocs/projects/models.py index aa9327ee66f..325795ae213 100644 --- a/readthedocs/projects/models.py +++ b/readthedocs/projects/models.py @@ -1832,6 +1832,7 @@ class HTTPHeader(TimeStampedModel, models.Model): HEADERS_CHOICES = ( ("access_control_allow_origin", "Access-Control-Allow-Origin"), ("access_control_allow_headers", "Access-Control-Allow-Headers"), + ("access_control_expose_headers", "Access-Control-Expose-Headers"), ("content_security_policy", "Content-Security-Policy"), ("feature_policy", "Feature-Policy"), ("permissions_policy", "Permissions-Policy"), From 8a5b9eaaf1fa95b7950d34dfb9d73164716e043f Mon Sep 17 00:00:00 2001 From: Manuel Kaufmann Date: Tue, 26 Mar 2024 11:18:50 +0100 Subject: [PATCH 2/2] Add missing migration --- .../migrations/0122_add_httpheader_option.py | 32 +++++++++++++++++++ 1 file changed, 32 insertions(+) create mode 100644 readthedocs/projects/migrations/0122_add_httpheader_option.py diff --git a/readthedocs/projects/migrations/0122_add_httpheader_option.py b/readthedocs/projects/migrations/0122_add_httpheader_option.py new file mode 100644 index 00000000000..baf28f6a125 --- /dev/null +++ b/readthedocs/projects/migrations/0122_add_httpheader_option.py @@ -0,0 +1,32 @@ +# Generated by Django 4.2.11 on 2024-03-26 10:17 + +from django.db import migrations, models +from django_safemigrate import Safe + + +class Migration(migrations.Migration): + safe = Safe.after_deploy + dependencies = [ + ("projects", "0121_remove_requirements_file"), + ] + + operations = [ + migrations.AlterField( + model_name="httpheader", + name="name", + field=models.CharField( + choices=[ + ("access_control_allow_origin", "Access-Control-Allow-Origin"), + ("access_control_allow_headers", "Access-Control-Allow-Headers"), + ("access_control_expose_headers", "Access-Control-Expose-Headers"), + ("content_security_policy", "Content-Security-Policy"), + ("feature_policy", "Feature-Policy"), + ("permissions_policy", "Permissions-Policy"), + ("referrer_policy", "Referrer-Policy"), + ("x_frame_options", "X-Frame-Options"), + ("x_content_type_options", "X-Content-Type-Options"), + ], + max_length=128, + ), + ), + ]