Skip to content

Commit f4efd14

Browse files
authored
Custom domain: increase header value length (#10625)
Headers like CSP can be pretty long.
1 parent f64b0d1 commit f4efd14

File tree

2 files changed

+18
-1
lines changed

2 files changed

+18
-1
lines changed
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,17 @@
1+
# Generated by Django 4.2.4 on 2023-08-10 21:03
2+
3+
from django.db import migrations, models
4+
5+
6+
class Migration(migrations.Migration):
7+
dependencies = [
8+
("projects", "0103_alter_emailhook_project_alter_webhook_project"),
9+
]
10+
11+
operations = [
12+
migrations.AlterField(
13+
model_name="httpheader",
14+
name="value",
15+
field=models.CharField(max_length=4096),
16+
),
17+
]

readthedocs/projects/models.py

+1-1
Original file line numberDiff line numberDiff line change
@@ -1890,7 +1890,7 @@ class HTTPHeader(TimeStampedModel, models.Model):
18901890
max_length=128,
18911891
choices=HEADERS_CHOICES,
18921892
)
1893-
value = models.CharField(max_length=256)
1893+
value = models.CharField(max_length=4096)
18941894
only_if_secure_request = models.BooleanField(
18951895
help_text='Only set this header if the request is secure (HTTPS)',
18961896
)

0 commit comments

Comments
 (0)