You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@trafficcontrol.apache.org by mi...@apache.org on 2020/12/18 19:16:16 UTC

[trafficcontrol] branch master updated: Add a new field to the Delivery Service to accommodate for "max_request_header_size" (#5345)

This is an automated email from the ASF dual-hosted git repository.

mitchell852 pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/trafficcontrol.git


The following commit(s) were added to refs/heads/master by this push:
     new a04b97e  Add a new field to the Delivery Service to accommodate for "max_request_header_size"  (#5345)
a04b97e is described below

commit a04b97ec24f77e1a3f1060d6b1a9fbf652888d22
Author: Srijeet Chatterjee <30...@users.noreply.github.com>
AuthorDate: Fri Dec 18 12:16:07 2020 -0700

    Add a new field to the Delivery Service to accommodate for "max_request_header_size"  (#5345)
    
    * Initial checkin: Adding field to DS in TO and TP
    
    * fixing field name
    
    * removing global check
    
    * Fixing UI hint
    
    * documentation and tests
    
    * wip
    
    * code review fixes
    
    * modify changelog
    
    * fix changelog
    
    * bad merge
    
    * Code review 1
    
    * code review contd
    
    * remove unneeded functions
    
    * fixing references
    
    * Changing struct field name to MaxRequestHeaderBytes
    
    * forgot a break
    
    * code review fixes
    
    * code review fixes
    
    * code review: add back deleted stuff
    
    * fix check for maxreqheaderbytes
    
    * TP changes
    
    * removing value from TP tables
    
    * adding upper limit for maxreqheaderbytes, changing tooltip
    
    * gofmt
    
    * TP change: host to xml id
    
    * renaming migration
---
 CHANGELOG.md                                       |   1 +
 docs/source/api/v3/deliveryservices.rst            | 122 ++++++++++---------
 docs/source/overview/delivery_services.rst         |   6 +
 .../ansible/roles/traffic_portal/defaults/main.yml |   2 +
 .../deliveryservices/010-ciab.json                 |   3 +-
 lib/go-atscfg/atscfg.go                            |   6 +-
 lib/go-tc/deliveryservices.go                      |  39 +++++-
 ...dd_max_request_header_size_delivery_service.sql |  22 ++++
 .../testing/api/v3/deliveryservices_test.go        |  68 +++++------
 traffic_ops/testing/api/v3/servers_test.go         |   8 +-
 traffic_ops/testing/api/v3/tc-fixtures.json        |  48 +++++---
 .../deliveryservice/deliveryservices.go            | 133 +++++++++++++++++----
 traffic_ops/traffic_ops_golang/routing/routes.go   |   3 +
 traffic_ops/v3-client/endpoints.go                 |   2 +-
 .../form.deliveryService.DNS.tpl.html              |  17 +++
 .../form.deliveryService.HTTP.tpl.html             |  17 +++
 .../table.cdnDeliveryServices.tpl.html             |   2 +
 .../TableDeliveryServicesController.js             |   1 +
 .../table.deliveryServices.tpl.html                |   2 +
 .../table.profileDeliveryServices.tpl.html         |   2 +
 ...table.serverCapabilityDeliveryServices.tpl.html |   2 +-
 .../table.serverDeliveryServices.tpl.html          |   2 +
 .../table.serviceCategoryDeliveryServices.tpl.html |   2 +
 .../table.tenantDeliveryServices.tpl.html          |   2 +
 .../table.topologyDeliveryServices.tpl.html        |   2 +
 .../table.typeDeliveryServices.tpl.html            |   2 +
 traffic_portal/app/src/scripts/config.js           |   2 +-
 .../app/src/traffic_portal_properties.json         |   6 +-
 traffic_portal/package-lock.json                   |   3 +-
 29 files changed, 379 insertions(+), 148 deletions(-)

diff --git a/CHANGELOG.md b/CHANGELOG.md
index fbfeba0..25a8fe8 100644
--- a/CHANGELOG.md
+++ b/CHANGELOG.md
@@ -5,6 +5,7 @@ The format is based on [Keep a Changelog](http://keepachangelog.com/en/1.0.0/).
 
 ## [unreleased]
 ### Added
+- Traffic Ops: added a feature so that the user can specify `maxRequestHeaderBytes` on a per delivery service basis
 - Traffic Router: log warnings when requests to Traffic Monitor return a 503 status code
 - #5344 - Add a page that addresses migrating from Traffic Ops API v1 for each endpoint
 - [#5296](https://github.com/apache/trafficcontrol/issues/5296) - Fixed a bug where users couldn't update any regex in Traffic Ops/ Traffic Portal
diff --git a/docs/source/api/v3/deliveryservices.rst b/docs/source/api/v3/deliveryservices.rst
index 0ae07b5..d96402f 100644
--- a/docs/source/api/v3/deliveryservices.rst
+++ b/docs/source/api/v3/deliveryservices.rst
@@ -120,35 +120,36 @@ Response Structure
 	:setNumber: An integer that provides explicit ordering of :ref:`ds-matchlist` items - this is used as a priority ranking by Traffic Router, and is not guaranteed to correspond to the ordering of items in the array.
 	:type:      The type of match performed using ``pattern``.
 
-:maxDnsAnswers:        The :ref:`ds-max-dns-answers` allowed for this :term:`Delivery Service`
-:maxOriginConnections: The :ref:`ds-max-origin-connections`
-:midHeaderRewrite:     A set of :ref:`ds-mid-header-rw-rules`
-:missLat:              The :ref:`ds-geo-miss-default-latitude` used by this :term:`Delivery Service`
-:missLong:             The :ref:`ds-geo-miss-default-longitude` used by this :term:`Delivery Service`
-:multiSiteOrigin:      A boolean that defines the use of :ref:`ds-multi-site-origin` by this :term:`Delivery Service`
-:orgServerFqdn:        The :ref:`ds-origin-url`
-:originShield:         A :ref:`ds-origin-shield` string
-:profileDescription:   The :ref:`profile-description` of the :ref:`ds-profile` with which this :term:`Delivery Service` is associated
-:profileId:            The :ref:`profile-id` of the :ref:`ds-profile` with which this :term:`Delivery Service` is associated
-:profileName:          The :ref:`profile-name` of the :ref:`ds-profile` with which this :term:`Delivery Service` is associated
-:protocol:             An integral, unique identifier that corresponds to the :ref:`ds-protocol` used by this :term:`Delivery Service`
-:qstringIgnore:        An integral, unique identifier that corresponds to the :ref:`ds-qstring-handling` setting on this :term:`Delivery Service`
-:rangeRequestHandling: An integral, unique identifier that corresponds to the :ref:`ds-range-request-handling` setting on this :term:`Delivery Service`
-:regexRemap:           A :ref:`ds-regex-remap`
-:regionalGeoBlocking:  A boolean defining the :ref:`ds-regionalgeo` setting on this :term:`Delivery Service`
-:remapText:            :ref:`ds-raw-remap`
-:serviceCategory:      The name of the :ref:`ds-service-category` with which the :term:`Delivery Service` is associated
-:signed:               ``true`` if  and only if ``signingAlgorithm`` is not ``null``, ``false`` otherwise
-:signingAlgorithm:     Either a :ref:`ds-signing-algorithm` or ``null`` to indicate URL/URI signing is not implemented on this :term:`Delivery Service`
-:rangeSliceBlockSize: An integer that defines the byte block size for the ATS Slice Plugin. It can only and must be set if ``rangeRequestHandling`` is set to 3.
-:sslKeyVersion:        This integer indicates the :ref:`ds-ssl-key-version`
-:tenantId:             The integral, unique identifier of the :ref:`ds-tenant` who owns this :term:`Delivery Service`
-:topology:             The unique name of the :term:`Topology` that this :term:`Delivery Service` is assigned to
-:trRequestHeaders:     If defined, this defines the :ref:`ds-tr-req-headers` used by Traffic Router for this :term:`Delivery Service`
-:trResponseHeaders:    If defined, this defines the :ref:`ds-tr-resp-headers` used by Traffic Router for this :term:`Delivery Service`
-:type:                 The :ref:`ds-types` of this :term:`Delivery Service`
-:typeId:               The integral, unique identifier of the :ref:`ds-types` of this :term:`Delivery Service`
-:xmlId:                This :term:`Delivery Service`'s :ref:`ds-xmlid`
+:maxDnsAnswers:         The :ref:`ds-max-dns-answers` allowed for this :term:`Delivery Service`
+:maxOriginConnections:  The :ref:`ds-max-origin-connections`
+:maxRequestHeaderBytes: The :ref:`ds-max-request-header-bytes`
+:midHeaderRewrite:      A set of :ref:`ds-mid-header-rw-rules`
+:missLat:               The :ref:`ds-geo-miss-default-latitude` used by this :term:`Delivery Service`
+:missLong:              The :ref:`ds-geo-miss-default-longitude` used by this :term:`Delivery Service`
+:multiSiteOrigin:       A boolean that defines the use of :ref:`ds-multi-site-origin` by this :term:`Delivery Service`
+:orgServerFqdn:         The :ref:`ds-origin-url`
+:originShield:          A :ref:`ds-origin-shield` string
+:profileDescription:    The :ref:`profile-description` of the :ref:`ds-profile` with which this :term:`Delivery Service` is associated
+:profileId:             The :ref:`profile-id` of the :ref:`ds-profile` with which this :term:`Delivery Service` is associated
+:profileName:           The :ref:`profile-name` of the :ref:`ds-profile` with which this :term:`Delivery Service` is associated
+:protocol:              An integral, unique identifier that corresponds to the :ref:`ds-protocol` used by this :term:`Delivery Service`
+:qstringIgnore:         An integral, unique identifier that corresponds to the :ref:`ds-qstring-handling` setting on this :term:`Delivery Service`
+:rangeRequestHandling:  An integral, unique identifier that corresponds to the :ref:`ds-range-request-handling` setting on this :term:`Delivery Service`
+:regexRemap:            A :ref:`ds-regex-remap`
+:regionalGeoBlocking:   A boolean defining the :ref:`ds-regionalgeo` setting on this :term:`Delivery Service`
+:remapText:             :ref:`ds-raw-remap`
+:serviceCategory:       The name of the :ref:`ds-service-category` with which the :term:`Delivery Service` is associated
+:signed:                ``true`` if  and only if ``signingAlgorithm`` is not ``null``, ``false`` otherwise
+:signingAlgorithm:      Either a :ref:`ds-signing-algorithm` or ``null`` to indicate URL/URI signing is not implemented on this :term:`Delivery Service`
+:rangeSliceBlockSize:   An integer that defines the byte block size for the ATS Slice Plugin. It can only and must be set if ``rangeRequestHandling`` is set to 3.
+:sslKeyVersion:         This integer indicates the :ref:`ds-ssl-key-version`
+:tenantId:              The integral, unique identifier of the :ref:`ds-tenant` who owns this :term:`Delivery Service`
+:topology:              The unique name of the :term:`Topology` that this :term:`Delivery Service` is assigned to
+:trRequestHeaders:      If defined, this defines the :ref:`ds-tr-req-headers` used by Traffic Router for this :term:`Delivery Service`
+:trResponseHeaders:     If defined, this defines the :ref:`ds-tr-resp-headers` used by Traffic Router for this :term:`Delivery Service`
+:type:                  The :ref:`ds-types` of this :term:`Delivery Service`
+:typeId:                The integral, unique identifier of the :ref:`ds-types` of this :term:`Delivery Service`
+:xmlId:                 This :term:`Delivery Service`'s :ref:`ds-xmlid`
 
 .. code-block:: http
 	:caption: Response Example
@@ -247,6 +248,7 @@ Response Structure
 			"zyx"
 		],
 		"maxOriginConnections": 0,
+		"maxRequestHeaderBytes": 131072,
 		"ecsEnabled": false,
 		"rangeSliceBlockSize": null,
 		"topology": null
@@ -305,6 +307,7 @@ Request Structure
 :longDesc2:                 An optional field containing the :ref:`ds-longdesc3` of this :term:`Delivery Service`
 :maxDnsAnswers:             The :ref:`ds-max-dns-answers` allowed for this :term:`Delivery Service`
 :maxOriginConnections:      The :ref:`ds-max-origin-connections`
+:maxRequestHeaderBytes:     The :ref:`ds-max-request-header-bytes`
 :midHeaderRewrite:          A set of :ref:`ds-mid-header-rw-rules`
 :missLat:                   The :ref:`ds-geo-miss-default-latitude` used by this :term:`Delivery Service`
 :missLong:                  The :ref:`ds-geo-miss-default-longitude` used by this :term:`Delivery Service`
@@ -359,6 +362,7 @@ Request Structure
 		"missLat": 0,
 		"missLong": 0,
 		"maxOriginConnections": 0,
+		"maxRequestHeaderBytes": 131072,
 		"multiSiteOrigin": false,
 		"orgServerFqdn": "http://origin.infra.ciab.test",
 		"protocol": 0,
@@ -426,35 +430,36 @@ Response Structure
 	:setNumber: An integer that provides explicit ordering of :ref:`ds-matchlist` items - this is used as a priority ranking by Traffic Router, and is not guaranteed to correspond to the ordering of items in the array.
 	:type:      The type of match performed using ``pattern``.
 
-:maxDnsAnswers:        The :ref:`ds-max-dns-answers` allowed for this :term:`Delivery Service`
-:maxOriginConnections: The :ref:`ds-max-origin-connections`
-:midHeaderRewrite:     A set of :ref:`ds-mid-header-rw-rules`
-:missLat:              The :ref:`ds-geo-miss-default-latitude` used by this :term:`Delivery Service`
-:missLong:             The :ref:`ds-geo-miss-default-longitude` used by this :term:`Delivery Service`
-:multiSiteOrigin:      A boolean that defines the use of :ref:`ds-multi-site-origin` by this :term:`Delivery Service`
-:orgServerFqdn:        The :ref:`ds-origin-url`
-:originShield:         A :ref:`ds-origin-shield` string
-:profileDescription:   The :ref:`profile-description` of the :ref:`ds-profile` with which this :term:`Delivery Service` is associated
-:profileId:            The :ref:`profile-id` of the :ref:`ds-profile` with which this :term:`Delivery Service` is associated
-:profileName:          The :ref:`profile-name` of the :ref:`ds-profile` with which this :term:`Delivery Service` is associated
-:protocol:             An integral, unique identifier that corresponds to the :ref:`ds-protocol` used by this :term:`Delivery Service`
-:qstringIgnore:        An integral, unique identifier that corresponds to the :ref:`ds-qstring-handling` setting on this :term:`Delivery Service`
-:rangeRequestHandling: An integral, unique identifier that corresponds to the :ref:`ds-range-request-handling` setting on this :term:`Delivery Service`
-:regexRemap:           A :ref:`ds-regex-remap`
-:regionalGeoBlocking:  A boolean defining the :ref:`ds-regionalgeo` setting on this :term:`Delivery Service`
-:remapText:            :ref:`ds-raw-remap`
-:serviceCategory:      The name of the :ref:`ds-service-category` with which the :term:`Delivery Service` is associated
-:signed:               ``true`` if  and only if ``signingAlgorithm`` is not ``null``, ``false`` otherwise
-:signingAlgorithm:     Either a :ref:`ds-signing-algorithm` or ``null`` to indicate URL/URI signing is not implemented on this :term:`Delivery Service`
-:rangeSliceBlockSize: An integer that defines the byte block size for the ATS Slice Plugin. It can only and must be set if ``rangeRequestHandling`` is set to 3.
-:sslKeyVersion: 	   This integer indicates the :ref:`ds-ssl-key-version`
-:tenantId:             The integral, unique identifier of the :ref:`ds-tenant` who owns this :term:`Delivery Service`
-:topology:             The unique name of the :term:`Topology` that this :term:`Delivery Service` is assigned to
-:trRequestHeaders:     If defined, this defines the :ref:`ds-tr-req-headers` used by Traffic Router for this :term:`Delivery Service`
-:trResponseHeaders:    If defined, this defines the :ref:`ds-tr-resp-headers` used by Traffic Router for this :term:`Delivery Service`
-:type:                 The :ref:`ds-types` of this :term:`Delivery Service`
-:typeId:               The integral, unique identifier of the :ref:`ds-types` of this :term:`Delivery Service`
-:xmlId:                This :term:`Delivery Service`'s :ref:`ds-xmlid`
+:maxDnsAnswers:         The :ref:`ds-max-dns-answers` allowed for this :term:`Delivery Service`
+:maxOriginConnections:  The :ref:`ds-max-origin-connections`
+:maxRequestHeaderBytes: The :ref:`ds-max-request-header-bytes`
+:midHeaderRewrite:      A set of :ref:`ds-mid-header-rw-rules`
+:missLat:               The :ref:`ds-geo-miss-default-latitude` used by this :term:`Delivery Service`
+:missLong:              The :ref:`ds-geo-miss-default-longitude` used by this :term:`Delivery Service`
+:multiSiteOrigin:       A boolean that defines the use of :ref:`ds-multi-site-origin` by this :term:`Delivery Service`
+:orgServerFqdn:         The :ref:`ds-origin-url`
+:originShield:          A :ref:`ds-origin-shield` string
+:profileDescription:    The :ref:`profile-description` of the :ref:`ds-profile` with which this :term:`Delivery Service` is associated
+:profileId:             The :ref:`profile-id` of the :ref:`ds-profile` with which this :term:`Delivery Service` is associated
+:profileName:           The :ref:`profile-name` of the :ref:`ds-profile` with which this :term:`Delivery Service` is associated
+:protocol:              An integral, unique identifier that corresponds to the :ref:`ds-protocol` used by this :term:`Delivery Service`
+:qstringIgnore:         An integral, unique identifier that corresponds to the :ref:`ds-qstring-handling` setting on this :term:`Delivery Service`
+:rangeRequestHandling:  An integral, unique identifier that corresponds to the :ref:`ds-range-request-handling` setting on this :term:`Delivery Service`
+:regexRemap:            A :ref:`ds-regex-remap`
+:regionalGeoBlocking:   A boolean defining the :ref:`ds-regionalgeo` setting on this :term:`Delivery Service`
+:remapText:             :ref:`ds-raw-remap`
+:serviceCategory:       The name of the :ref:`ds-service-category` with which the :term:`Delivery Service` is associated
+:signed:                ``true`` if  and only if ``signingAlgorithm`` is not ``null``, ``false`` otherwise
+:signingAlgorithm:      Either a :ref:`ds-signing-algorithm` or ``null`` to indicate URL/URI signing is not implemented on this :term:`Delivery Service`
+:rangeSliceBlockSize:   An integer that defines the byte block size for the ATS Slice Plugin. It can only and must be set if ``rangeRequestHandling`` is set to 3.
+:sslKeyVersion: 	    This integer indicates the :ref:`ds-ssl-key-version`
+:tenantId:              The integral, unique identifier of the :ref:`ds-tenant` who owns this :term:`Delivery Service`
+:topology:              The unique name of the :term:`Topology` that this :term:`Delivery Service` is assigned to
+:trRequestHeaders:      If defined, this defines the :ref:`ds-tr-req-headers` used by Traffic Router for this :term:`Delivery Service`
+:trResponseHeaders:     If defined, this defines the :ref:`ds-tr-resp-headers` used by Traffic Router for this :term:`Delivery Service`
+:type:                  The :ref:`ds-types` of this :term:`Delivery Service`
+:typeId:                The integral, unique identifier of the :ref:`ds-types` of this :term:`Delivery Service`
+:xmlId:                 This :term:`Delivery Service`'s :ref:`ds-xmlid`
 
 .. code-block:: http
 	:caption: Response Example
@@ -521,6 +526,7 @@ Response Structure
 			],
 			"maxDnsAnswers": null,
 			"maxOriginConnections": 0,
+			"maxRequestHeaderBytes": 131072,
 			"midHeaderRewrite": null,
 			"missLat": -1,
 			"missLong": -1,
diff --git a/docs/source/overview/delivery_services.rst b/docs/source/overview/delivery_services.rst
index 28afcce..2496b38 100644
--- a/docs/source/overview/delivery_services.rst
+++ b/docs/source/overview/delivery_services.rst
@@ -527,6 +527,12 @@ Max Origin Connections
 ----------------------
 The maximum number of TCP connections individual :term:`Mid-tier cache servers` are allowed to make to the `Origin Server Base URL`. A value of ``0`` in this field indicates that there is no maximum.
 
+.. _ds-max-request-header-bytes:
+
+Max Request Header Bytes
+------------------------
+The maximum size(in bytes) of the request header that is allowed for this Delivery Service.
+
 .. _ds-mid-header-rw-rules:
 
 Mid Header Rewrite Rules
diff --git a/infrastructure/ansible/roles/traffic_portal/defaults/main.yml b/infrastructure/ansible/roles/traffic_portal/defaults/main.yml
index b2dae76..b80a2f6 100644
--- a/infrastructure/ansible/roles/traffic_portal/defaults/main.yml
+++ b/infrastructure/ansible/roles/traffic_portal/defaults/main.yml
@@ -144,6 +144,7 @@ tp_default_properties_template:
           rangeRequestHandling: 0
           qstringIgnore: 0
           maxOriginConnections: 0
+          maxRequestHeaderBytes: 131072
           multiSiteOrigin: false
           logsEnabled: false
           geoProvider: 0
@@ -163,6 +164,7 @@ tp_default_properties_template:
           rangeRequestHandling: 0
           qstringIgnore: 0
           maxOriginConnections: 0
+          maxRequestHeaderBytes: 131072
           multiSiteOrigin: false
           logsEnabled: false
           initialDispersion: 1
diff --git a/infrastructure/cdn-in-a-box/traffic_ops_data/deliveryservices/010-ciab.json b/infrastructure/cdn-in-a-box/traffic_ops_data/deliveryservices/010-ciab.json
index 0bdea6e..c0378df 100644
--- a/infrastructure/cdn-in-a-box/traffic_ops_data/deliveryservices/010-ciab.json
+++ b/infrastructure/cdn-in-a-box/traffic_ops_data/deliveryservices/010-ciab.json
@@ -29,5 +29,6 @@
         "xxx",
         "pdq",
         "abc"
-    ]
+    ],
+    "maxRequestHeaderBytes": 131072
 }
diff --git a/lib/go-atscfg/atscfg.go b/lib/go-atscfg/atscfg.go
index 66da3c7..e69db8c 100644
--- a/lib/go-atscfg/atscfg.go
+++ b/lib/go-atscfg/atscfg.go
@@ -70,7 +70,11 @@ func ToDeliveryServices(dses []tc.DeliveryServiceNullableV30) []DeliveryService
 func OldToDeliveryServices(dses []tc.DeliveryServiceNullable) []DeliveryService {
 	ad := []DeliveryService{}
 	for _, ds := range dses {
-		upgradedDS := tc.DeliveryServiceNullableV30{DeliveryServiceNullableV15: tc.DeliveryServiceNullableV15(ds)}
+		upgradedDS := tc.DeliveryServiceNullableV30{
+			DeliveryServiceV30: tc.DeliveryServiceV30{
+				DeliveryServiceNullableV15: tc.DeliveryServiceNullableV15(ds),
+			},
+		}
 		ad = append(ad, DeliveryService(upgradedDS))
 	}
 	return ad
diff --git a/lib/go-tc/deliveryservices.go b/lib/go-tc/deliveryservices.go
index 188233d..7a4fb64 100644
--- a/lib/go-tc/deliveryservices.go
+++ b/lib/go-tc/deliveryservices.go
@@ -32,6 +32,9 @@ import (
 */
 
 const DefaultRoutingName = "cdn"
+const DefaultMaxRequestHeaderBytes = 131072
+const MinRangeSliceBlockSize = 262144   // 265Kib
+const MaxRangeSliceBlockSize = 33554432 // 32Mib
 
 // GetDeliveryServiceResponse is deprecated use DeliveryServicesResponse...
 type GetDeliveryServiceResponse struct {
@@ -170,7 +173,7 @@ type DeliveryServiceV11 struct {
 	XMLID                    string                 `json:"xmlId"`
 }
 
-type DeliveryServiceNullableV30 struct {
+type DeliveryServiceV30 struct {
 	DeliveryServiceNullableV15
 	Topology           *string `json:"topology" db:"topology"`
 	FirstHeaderRewrite *string `json:"firstHeaderRewrite" db:"first_header_rewrite"`
@@ -179,6 +182,17 @@ type DeliveryServiceNullableV30 struct {
 	ServiceCategory    *string `json:"serviceCategory" db:"service_category"`
 }
 
+type DeliveryServiceV31 struct {
+	DeliveryServiceV30
+	MaxRequestHeaderBytes *int `json:"maxRequestHeaderBytes" db:"max_request_header_bytes"`
+}
+
+// DeliveryServiceNullableV30 is the aliased structure that we should be using for all api 3.x delivery structure operations
+// This type should always alias the latest 3.x minor version struct. For ex, if you wanted to create a DeliveryServiceV32 struct, you would do the following:
+// type DeliveryServiceNullableV30 DeliveryServiceV32
+// DeliveryServiceV32 = DeliveryServiceV31 + the new fields
+type DeliveryServiceNullableV30 DeliveryServiceV31
+
 // Deprecated: Use versioned structures only from now on.
 type DeliveryServiceNullable DeliveryServiceNullableV15
 type DeliveryServiceNullableV15 struct {
@@ -370,6 +384,9 @@ func (ds *DeliveryServiceNullableV30) Sanitize() {
 		ds.DeepCachingType = &s
 	}
 	*ds.DeepCachingType = DeepCachingTypeFromString(string(*ds.DeepCachingType))
+	if ds.MaxRequestHeaderBytes == nil {
+		ds.MaxRequestHeaderBytes = util.IntPtr(DefaultMaxRequestHeaderBytes)
+	}
 }
 
 func setNilIfEmpty(ptrs ...**string) {
@@ -428,8 +445,8 @@ func (ds *DeliveryServiceNullable) validateTypeFields(tx *sql.Tx) error {
 					if *ds.RangeRequestHandling == 3 {
 						return validation.Validate(ds.RangeSliceBlockSize, validation.Required,
 							// Per Slice Plugin implementation
-							validation.Min(262144),   // 256KiB
-							validation.Max(33554432), // 32MiB
+							validation.Min(MinRangeSliceBlockSize), // 256KiB
+							validation.Max(MaxRangeSliceBlockSize), // 32MiB
 						)
 					}
 					if ds.RangeSliceBlockSize != nil {
@@ -500,8 +517,8 @@ func (ds *DeliveryServiceNullableV30) validateTypeFields(tx *sql.Tx) error {
 					if *ds.RangeRequestHandling == 3 {
 						return validation.Validate(ds.RangeSliceBlockSize, validation.Required,
 							// Per Slice Plugin implementation
-							validation.Min(262144),   // 256KiB
-							validation.Max(33554432), // 32MiB
+							validation.Min(MinRangeSliceBlockSize), // 256KiB
+							validation.Max(MaxRangeSliceBlockSize), // 32MiB
 						)
 					}
 					if ds.RangeSliceBlockSize != nil {
@@ -524,6 +541,17 @@ func (ds *DeliveryServiceNullableV30) validateTypeFields(tx *sql.Tx) error {
 				}
 				return nil
 			})),
+		"maxRequestHeaderBytes": validation.Validate(ds,
+			validation.By(func(dsi interface{}) error {
+				ds := dsi.(*DeliveryServiceNullableV30)
+				if ds.MaxRequestHeaderBytes == nil {
+					return errors.New("maxRequestHeaderBytes empty, must be a valid positive value")
+				}
+				if *ds.MaxRequestHeaderBytes <= 0 || *ds.MaxRequestHeaderBytes > 2147483647 {
+					return errors.New("maxRequestHeaderBytes must be a valid positive value between 1 and 2147483647")
+				}
+				return nil
+			})),
 	}
 	toErrs := tovalidate.ToErrors(errs)
 	if len(toErrs) > 0 {
@@ -796,7 +824,6 @@ type DeliveryServiceSafeUpdateResponse struct {
 
 // DeliveryServiceSafeUpdateResponse represents Traffic Ops's response to a PUT
 // request to its /api/3.0/deliveryservices/{{ID}}/safe endpoint.
-// Deprecated: Please only use versioned structures.
 type DeliveryServiceSafeUpdateResponseV30 struct {
 	Alerts
 	// Response contains the representation of the Delivery Service after it has
diff --git a/traffic_ops/app/db/migrations/2020121800000000_add_max_request_header_size_delivery_service.sql b/traffic_ops/app/db/migrations/2020121800000000_add_max_request_header_size_delivery_service.sql
new file mode 100644
index 0000000..69b39cd
--- /dev/null
+++ b/traffic_ops/app/db/migrations/2020121800000000_add_max_request_header_size_delivery_service.sql
@@ -0,0 +1,22 @@
+/*
+
+    Licensed under the Apache License, Version 2.0 (the "License");
+    you may not use this file except in compliance with the License.
+    You may obtain a copy of the License at
+
+        http://www.apache.org/licenses/LICENSE-2.0
+
+    Unless required by applicable law or agreed to in writing, software
+    distributed under the License is distributed on an "AS IS" BASIS,
+    WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+    See the License for the specific language governing permissions and
+    limitations under the License.
+*/
+
+-- +goose Up
+-- SQL in section 'Up' is executed when this migration is applied
+ALTER TABLE deliveryservice ADD COLUMN max_request_header_bytes int NOT NULL DEFAULT 131072;
+
+-- +goose Down
+-- SQL section 'Down' is executed when this migration is rolled back
+ALTER TABLE deliveryservice DROP COLUMN max_request_header_bytes;
diff --git a/traffic_ops/testing/api/v3/deliveryservices_test.go b/traffic_ops/testing/api/v3/deliveryservices_test.go
index a84fe74..aa565ad 100644
--- a/traffic_ops/testing/api/v3/deliveryservices_test.go
+++ b/traffic_ops/testing/api/v3/deliveryservices_test.go
@@ -175,39 +175,30 @@ func SSLDeliveryServiceCDNUpdateTest(t *testing.T) {
 		t.Fatal("expected at least one type")
 	}
 
-	customDS := tc.DeliveryServiceNullableV30{
-		DeliveryServiceNullableV15: tc.DeliveryServiceNullableV15{
-			DeliveryServiceNullableV14: tc.DeliveryServiceNullableV14{
-				DeliveryServiceNullableV13: tc.DeliveryServiceNullableV13{
-					DeliveryServiceNullableV12: tc.DeliveryServiceNullableV12{
-						DeliveryServiceNullableV11: tc.DeliveryServiceNullableV11{
-							Active:               util.BoolPtr(true),
-							CDNID:                util.IntPtr(oldCdn.ID),
-							DSCP:                 util.IntPtr(0),
-							DisplayName:          util.StrPtr("displayName"),
-							RoutingName:          util.StrPtr("routingName"),
-							GeoLimit:             util.IntPtr(0),
-							GeoProvider:          util.IntPtr(0),
-							IPV6RoutingEnabled:   util.BoolPtr(false),
-							InitialDispersion:    util.IntPtr(1),
-							LogsEnabled:          util.BoolPtr(true),
-							MissLat:              util.FloatPtr(0),
-							MissLong:             util.FloatPtr(0),
-							MultiSiteOrigin:      util.BoolPtr(false),
-							OrgServerFQDN:        util.StrPtr("https://test.com"),
-							Protocol:             util.IntPtr(2),
-							QStringIgnore:        util.IntPtr(0),
-							RangeRequestHandling: util.IntPtr(0),
-							RegionalGeoBlocking:  util.BoolPtr(false),
-							TenantID:             util.IntPtr(1),
-							TypeID:               util.IntPtr(types[0].ID),
-							XMLID:                util.StrPtr("dsID"),
-						},
-					},
-				},
-			},
-		},
-	}
+	customDS := tc.DeliveryServiceNullableV30{}
+	customDS.Active = util.BoolPtr(true)
+	customDS.CDNID = util.IntPtr(oldCdn.ID)
+	customDS.DSCP = util.IntPtr(0)
+	customDS.DisplayName = util.StrPtr("displayName")
+	customDS.RoutingName = util.StrPtr("routingName")
+	customDS.GeoLimit = util.IntPtr(0)
+	customDS.GeoProvider = util.IntPtr(0)
+	customDS.IPV6RoutingEnabled = util.BoolPtr(false)
+	customDS.InitialDispersion = util.IntPtr(1)
+	customDS.LogsEnabled = util.BoolPtr(true)
+	customDS.MissLat = util.FloatPtr(0)
+	customDS.MissLong = util.FloatPtr(0)
+	customDS.MultiSiteOrigin = util.BoolPtr(false)
+	customDS.OrgServerFQDN = util.StrPtr("https://test.com")
+	customDS.Protocol = util.IntPtr(2)
+	customDS.QStringIgnore = util.IntPtr(0)
+	customDS.RangeRequestHandling = util.IntPtr(0)
+	customDS.RegionalGeoBlocking = util.BoolPtr(false)
+	customDS.TenantID = util.IntPtr(1)
+	customDS.TypeID = util.IntPtr(types[0].ID)
+	customDS.XMLID = util.StrPtr("dsID")
+	customDS.MaxRequestHeaderBytes = nil
+
 	ds, _, err := TOSession.CreateDeliveryServiceV30(customDS)
 	if err != nil {
 		t.Fatal(err)
@@ -458,6 +449,7 @@ func UpdateTestDeliveryServices(t *testing.T) {
 		t.Errorf("GET Delivery Services missing: %v", firstDS.XMLID)
 	}
 
+	updatedMaxRequestHeaderSize := 131080
 	updatedLongDesc := "something different"
 	updatedMaxDNSAnswers := 164598
 	updatedMaxOriginConnections := 100
@@ -465,6 +457,7 @@ func UpdateTestDeliveryServices(t *testing.T) {
 	remoteDS.MaxDNSAnswers = &updatedMaxDNSAnswers
 	remoteDS.MaxOriginConnections = &updatedMaxOriginConnections
 	remoteDS.MatchList = nil // verify that this field is optional in a PUT request, doesn't cause nil dereference panic
+	remoteDS.MaxRequestHeaderBytes = &updatedMaxRequestHeaderSize
 
 	if updateResp, _, err := TOSession.UpdateDeliveryServiceV30WithHdr(*remoteDS.ID, remoteDS, nil); err != nil {
 		t.Errorf("cannot UPDATE DeliveryService by ID: %v - %v", err, updateResp)
@@ -482,10 +475,11 @@ func UpdateTestDeliveryServices(t *testing.T) {
 	}
 	resp := apiResp[0]
 
-	if *resp.LongDesc != updatedLongDesc || *resp.MaxDNSAnswers != updatedMaxDNSAnswers || *resp.MaxOriginConnections != updatedMaxOriginConnections {
-		t.Errorf("results do not match actual: %s, expected: %s", *resp.LongDesc, updatedLongDesc)
-		t.Errorf("results do not match actual: %v, expected: %v", resp.MaxDNSAnswers, updatedMaxDNSAnswers)
-		t.Errorf("results do not match actual: %v, expected: %v", resp.MaxOriginConnections, updatedMaxOriginConnections)
+	if *resp.LongDesc != updatedLongDesc || *resp.MaxDNSAnswers != updatedMaxDNSAnswers || *resp.MaxOriginConnections != updatedMaxOriginConnections || *resp.MaxRequestHeaderBytes != updatedMaxRequestHeaderSize {
+		t.Errorf("long description do not match actual: %s, expected: %s", *resp.LongDesc, updatedLongDesc)
+		t.Errorf("max DNS answers do not match actual: %v, expected: %v", resp.MaxDNSAnswers, updatedMaxDNSAnswers)
+		t.Errorf("max origin connections do not match actual: %v, expected: %v", resp.MaxOriginConnections, updatedMaxOriginConnections)
+		t.Errorf("max request header sizes do not match actual: %v, expected: %v", resp.MaxRequestHeaderBytes, updatedMaxRequestHeaderSize)
 	}
 }
 
diff --git a/traffic_ops/testing/api/v3/servers_test.go b/traffic_ops/testing/api/v3/servers_test.go
index 9d0d4d1..fdc3ff5 100644
--- a/traffic_ops/testing/api/v3/servers_test.go
+++ b/traffic_ops/testing/api/v3/servers_test.go
@@ -738,7 +738,13 @@ func UniqueIPProfileTestServers(t *testing.T) {
 		t.Fatal("expected more than 0 servers")
 	}
 	xmppId := "unique"
-	server := serversResp.Response[0]
+	var server tc.ServerV30
+	for _, s := range serversResp.Response {
+		if len(s.Interfaces) >= 1 && s.Interfaces[0].Monitor {
+			server = s
+			break
+		}
+	}
 	_, _, err = TOSession.CreateServerWithHdr(tc.ServerV30{
 		CommonServerProperties: tc.CommonServerProperties{
 			Cachegroup: server.Cachegroup,
diff --git a/traffic_ops/testing/api/v3/tc-fixtures.json b/traffic_ops/testing/api/v3/tc-fixtures.json
index 11ca674..7e8fd55 100644
--- a/traffic_ops/testing/api/v3/tc-fixtures.json
+++ b/traffic_ops/testing/api/v3/tc-fixtures.json
@@ -427,7 +427,8 @@
             "tenantName": "tenant1",
             "type": "HTTP",
             "xmlId": "ds1",
-            "anonymousBlockingEnabled": true
+            "anonymousBlockingEnabled": true,
+            "maxRequestHeaderBytes": 131072
         },
         {
             "active": true,
@@ -495,7 +496,8 @@
             "tenantName": "tenant2",
             "type": "HTTP_LIVE",
             "xmlId": "ds2",
-            "anonymousBlockingEnabled": true
+            "anonymousBlockingEnabled": true,
+            "maxRequestHeaderBytes": 131072
         },
         {
             "active": true,
@@ -563,7 +565,8 @@
             "tenantName": "tenant3",
             "type": "HTTP_LIVE",
             "xmlId": "ds3",
-            "anonymousBlockingEnabled": true
+            "anonymousBlockingEnabled": true,
+            "maxRequestHeaderBytes": 131072
         },
         {
             "active": true,
@@ -621,7 +624,8 @@
             "tenantName": "tenant3",
             "type": "ANY_MAP",
             "xmlId": "anymap-ds",
-            "anonymousBlockingEnabled": true
+            "anonymousBlockingEnabled": true,
+            "maxRequestHeaderBytes": 131072
         },
         {
             "active": true,
@@ -680,7 +684,8 @@
             "trResponseHeaders": "Access-Control-Allow-Origin: *\nContent-Type: text/html; charset=utf-8",
             "type": "HTTP_LIVE",
             "xmlId": "ds-test-minor-versions",
-            "anonymousBlockingEnabled": true
+            "anonymousBlockingEnabled": true,
+            "maxRequestHeaderBytes": 131072
         },
         {
             "active": true,
@@ -747,7 +752,8 @@
             "tenantName": "tenant1",
             "type": "HTTP_LIVE",
             "xmlId": "msods1",
-            "anonymousBlockingEnabled": true
+            "anonymousBlockingEnabled": true,
+            "maxRequestHeaderBytes": 131072
         },
         {
             "active": true,
@@ -814,7 +820,8 @@
             "tenantName": "tenant1",
             "type": "HTTP_LIVE_NATNL",
             "xmlId": "ds1nat",
-            "anonymousBlockingEnabled": true
+            "anonymousBlockingEnabled": true,
+            "maxRequestHeaderBytes": 131072
         },
         {
             "active": true,
@@ -881,7 +888,8 @@
             "topology": "mso-topology",
             "firstHeaderRewrite": "first header rewrite",
             "innerHeaderRewrite": "inner header rewrite",
-            "lastHeaderRewrite": "last header rewrite"
+            "lastHeaderRewrite": "last header rewrite",
+            "maxRequestHeaderBytes": 131072
         },
         {
             "active": true,
@@ -945,7 +953,8 @@
             "topology": "top-for-ds-req",
             "type": "HTTP",
             "xmlId": "ds-top-req-cap",
-            "anonymousBlockingEnabled": false
+            "anonymousBlockingEnabled": false,
+            "maxRequestHeaderBytes": 131072
         },
         {
             "active": true,
@@ -1009,7 +1018,8 @@
             "topology": "top-for-ds-req2",
             "type": "HTTP",
             "xmlId": "ds-top-req-cap2",
-            "anonymousBlockingEnabled": false
+            "anonymousBlockingEnabled": false,
+            "maxRequestHeaderBytes": 131072
         },
         {
             "active": true,
@@ -1072,7 +1082,8 @@
             "tenantName": "tenant1",
             "type": "CLIENT_STEERING",
             "xmlId": "ds-client-steering",
-            "anonymousBlockingEnabled": false
+            "anonymousBlockingEnabled": false,
+            "maxRequestHeaderBytes": 131072
         },
         {
             "active": true,
@@ -1136,7 +1147,8 @@
             "topology": "forked-topology",
             "type": "HTTP",
             "xmlId": "ds-forked-topology",
-            "anonymousBlockingEnabled": false
+            "anonymousBlockingEnabled": false,
+            "maxRequestHeaderBytes": 131072
         },
         {
             "active": true,
@@ -1200,7 +1212,8 @@
             "topology": "top-used-by-cdn1-and-cdn2",
             "type": "HTTP",
             "xmlId": "top-ds-in-cdn1",
-            "anonymousBlockingEnabled": false
+            "anonymousBlockingEnabled": false,
+            "maxRequestHeaderBytes": 131072
         },
         {
             "active": true,
@@ -1264,7 +1277,8 @@
             "topology": "top-used-by-cdn1-and-cdn2",
             "type": "HTTP",
             "xmlId": "top-ds-in-cdn2",
-            "anonymousBlockingEnabled": false
+            "anonymousBlockingEnabled": false,
+            "maxRequestHeaderBytes": 131072
         },
         {
             "active": false,
@@ -1331,7 +1345,8 @@
             "tenantName": "tenant1",
             "type": "HTTP",
             "xmlId": "inactiveds",
-            "anonymousBlockingEnabled": true
+            "anonymousBlockingEnabled": true,
+            "maxRequestHeaderBytes": 131072
         },
         {
             "active": true,
@@ -1354,7 +1369,8 @@
             "regionalGeoBlocking": false,
             "tenant": "tenant1",
             "type": "HTTP",
-            "xmlId": "test-ds-server-assignments"
+            "xmlId": "test-ds-server-assignments",
+            "maxRequestHeaderBytes": 131072
         }
     ],
     "deliveryServicesRegexes": [
diff --git a/traffic_ops/traffic_ops_golang/deliveryservice/deliveryservices.go b/traffic_ops/traffic_ops_golang/deliveryservice/deliveryservices.go
index eb1bad3..95def1e 100644
--- a/traffic_ops/traffic_ops_golang/deliveryservice/deliveryservices.go
+++ b/traffic_ops/traffic_ops_golang/deliveryservice/deliveryservices.go
@@ -180,6 +180,28 @@ func CreateV15(w http.ResponseWriter, r *http.Request) {
 	api.WriteRespAlertObj(w, r, tc.SuccessLevel, "Deliveryservice creation was successful.", []tc.DeliveryServiceNullableV15{*res})
 }
 
+func CreateV31(w http.ResponseWriter, r *http.Request) {
+	inf, userErr, sysErr, errCode := api.NewInfo(r, nil, nil)
+	if userErr != nil || sysErr != nil {
+		api.HandleErr(w, r, inf.Tx.Tx, errCode, userErr, sysErr)
+		return
+	}
+	defer inf.Close()
+
+	ds := tc.DeliveryServiceV31{}
+	if err := json.NewDecoder(r.Body).Decode(&ds); err != nil {
+		api.HandleErr(w, r, inf.Tx.Tx, http.StatusBadRequest, errors.New("decoding: "+err.Error()), nil)
+		return
+	}
+
+	res, status, userErr, sysErr := createV31(w, r, inf, ds)
+	if userErr != nil || sysErr != nil {
+		api.HandleErr(w, r, inf.Tx.Tx, status, userErr, sysErr)
+		return
+	}
+	api.WriteRespAlertObj(w, r, tc.SuccessLevel, "Deliveryservice creation was successful.", []tc.DeliveryServiceV31{*res})
+}
+
 func CreateV30(w http.ResponseWriter, r *http.Request) {
 	inf, userErr, sysErr, errCode := api.NewInfo(r, nil, nil)
 	if userErr != nil || sysErr != nil {
@@ -188,7 +210,7 @@ func CreateV30(w http.ResponseWriter, r *http.Request) {
 	}
 	defer inf.Close()
 
-	ds := tc.DeliveryServiceNullableV30{}
+	ds := tc.DeliveryServiceV30{}
 	if err := json.NewDecoder(r.Body).Decode(&ds); err != nil {
 		api.HandleErr(w, r, inf.Tx.Tx, http.StatusBadRequest, errors.New("decoding: "+err.Error()), nil)
 		return
@@ -199,7 +221,7 @@ func CreateV30(w http.ResponseWriter, r *http.Request) {
 		api.HandleErr(w, r, inf.Tx.Tx, status, userErr, sysErr)
 		return
 	}
-	api.WriteRespAlertObj(w, r, tc.SuccessLevel, "Deliveryservice creation was successful.", []tc.DeliveryServiceNullableV30{*res})
+	api.WriteRespAlertObj(w, r, tc.SuccessLevel, "Deliveryservice creation was successful.", []tc.DeliveryServiceV30{*res})
 }
 
 func createV12(w http.ResponseWriter, r *http.Request, inf *api.APIInfo, reqDS tc.DeliveryServiceNullableV12) (*tc.DeliveryServiceNullableV12, int, error, error) {
@@ -230,7 +252,7 @@ func createV14(w http.ResponseWriter, r *http.Request, inf *api.APIInfo, reqDS t
 }
 
 func createV15(w http.ResponseWriter, r *http.Request, inf *api.APIInfo, reqDS tc.DeliveryServiceNullableV15) (*tc.DeliveryServiceNullableV15, int, error, error) {
-	dsV30 := tc.DeliveryServiceNullableV30{DeliveryServiceNullableV15: reqDS}
+	dsV30 := tc.DeliveryServiceV30{DeliveryServiceNullableV15: reqDS}
 	res, status, userErr, sysErr := createV30(w, r, inf, dsV30)
 	if res != nil {
 		return &res.DeliveryServiceNullableV15, status, userErr, sysErr
@@ -239,11 +261,21 @@ func createV15(w http.ResponseWriter, r *http.Request, inf *api.APIInfo, reqDS t
 }
 
 // create creates the given ds in the database, and returns the DS with its id and other fields created on insert set. On error, the HTTP status code, user error, and system error are returned. The status code SHOULD NOT be used, if both errors are nil.
-func createV30(w http.ResponseWriter, r *http.Request, inf *api.APIInfo, ds tc.DeliveryServiceNullableV30) (*tc.DeliveryServiceNullableV30, int, error, error) {
+func createV30(w http.ResponseWriter, r *http.Request, inf *api.APIInfo, dsV30 tc.DeliveryServiceV30) (*tc.DeliveryServiceV30, int, error, error) {
+	ds := tc.DeliveryServiceV31{DeliveryServiceV30: dsV30}
+	res, status, userErr, sysErr := createV31(w, r, inf, ds)
+	if res != nil {
+		return &res.DeliveryServiceV30, status, userErr, sysErr
+	}
+	return nil, status, userErr, sysErr
+}
+
+// create creates the given ds in the database, and returns the DS with its id and other fields created on insert set. On error, the HTTP status code, user error, and system error are returned. The status code SHOULD NOT be used, if both errors are nil.
+func createV31(w http.ResponseWriter, r *http.Request, inf *api.APIInfo, dsV31 tc.DeliveryServiceV31) (*tc.DeliveryServiceV31, int, error, error) {
 	user := inf.User
 	tx := inf.Tx.Tx
 	cfg := inf.Config
-
+	ds := tc.DeliveryServiceNullableV30(dsV31)
 	if err := ds.Validate(tx); err != nil {
 		return nil, http.StatusBadRequest, errors.New("invalid request: " + err.Error()), nil
 	}
@@ -263,7 +295,6 @@ func createV30(w http.ResponseWriter, r *http.Request, inf *api.APIInfo, ds tc.D
 	if errCode, userErr, sysErr := dbhelpers.CheckTopology(inf.Tx, ds); userErr != nil || sysErr != nil {
 		return nil, errCode, userErr, sysErr
 	}
-
 	resultRows, err := tx.Query(insertQuery(),
 		&ds.Active,
 		&ds.AnonymousBlockingEnabled,
@@ -324,6 +355,7 @@ func createV30(w http.ResponseWriter, r *http.Request, inf *api.APIInfo, ds tc.D
 		&ds.InnerHeaderRewrite,
 		&ds.LastHeaderRewrite,
 		&ds.ServiceCategory,
+		&ds.MaxRequestHeaderBytes,
 	)
 
 	if err != nil {
@@ -407,7 +439,8 @@ func createV30(w http.ResponseWriter, r *http.Request, inf *api.APIInfo, ds tc.D
 		return nil, http.StatusInternalServerError, nil, errors.New("error writing to audit log: " + err.Error())
 	}
 
-	return &ds, http.StatusOK, nil, nil
+	dsV31 = tc.DeliveryServiceV31(ds)
+	return &dsV31, http.StatusOK, nil, nil
 }
 
 func createDefaultRegex(tx *sql.Tx, dsID int, xmlID string) error {
@@ -461,8 +494,10 @@ func (ds *TODeliveryService) Read(h http.Header, useIMS bool) ([]interface{}, er
 	for _, ds := range dses {
 		switch {
 		// NOTE: it's required to handle minor version cases in a descending >= manner
-		case version.Major > 2:
+		case version.Major > 2 && version.Minor >= 1:
 			returnable = append(returnable, ds)
+		case version.Major > 2:
+			returnable = append(returnable, ds.DeliveryServiceV30)
 		case version.Major > 1 || version.Minor >= 5:
 			returnable = append(returnable, ds.DeliveryServiceNullableV15)
 		case version.Minor >= 4:
@@ -588,7 +623,7 @@ func UpdateV30(w http.ResponseWriter, r *http.Request) {
 
 	id := inf.IntParams["id"]
 
-	ds := tc.DeliveryServiceNullableV30{}
+	ds := tc.DeliveryServiceV30{}
 	if err := json.NewDecoder(r.Body).Decode(&ds); err != nil {
 		api.HandleErr(w, r, inf.Tx.Tx, http.StatusBadRequest, errors.New("malformed JSON: "+err.Error()), nil)
 		return
@@ -600,7 +635,31 @@ func UpdateV30(w http.ResponseWriter, r *http.Request) {
 		api.HandleErr(w, r, inf.Tx.Tx, status, userErr, sysErr)
 		return
 	}
-	api.WriteRespAlertObj(w, r, tc.SuccessLevel, "Deliveryservice update was successful.", []tc.DeliveryServiceNullableV30{*res})
+	api.WriteRespAlertObj(w, r, tc.SuccessLevel, "Deliveryservice update was successful.", []tc.DeliveryServiceV30{*res})
+}
+
+func UpdateV31(w http.ResponseWriter, r *http.Request) {
+	inf, userErr, sysErr, errCode := api.NewInfo(r, nil, []string{"id"})
+	if userErr != nil || sysErr != nil {
+		api.HandleErr(w, r, inf.Tx.Tx, errCode, userErr, sysErr)
+		return
+	}
+	defer inf.Close()
+
+	id := inf.IntParams["id"]
+
+	ds := tc.DeliveryServiceV31{}
+	if err := json.NewDecoder(r.Body).Decode(&ds); err != nil {
+		api.HandleErr(w, r, inf.Tx.Tx, http.StatusBadRequest, errors.New("malformed JSON: "+err.Error()), nil)
+		return
+	}
+	ds.ID = &id
+	res, status, userErr, sysErr := updateV31(w, r, inf, &ds)
+	if userErr != nil || sysErr != nil {
+		api.HandleErr(w, r, inf.Tx.Tx, status, userErr, sysErr)
+		return
+	}
+	api.WriteRespAlertObj(w, r, tc.SuccessLevel, "Deliveryservice update was successful.", []tc.DeliveryServiceV31{*res})
 }
 
 func updateV12(w http.ResponseWriter, r *http.Request, inf *api.APIInfo, reqDS *tc.DeliveryServiceNullableV12) (*tc.DeliveryServiceNullableV12, int, error, error) {
@@ -699,7 +758,7 @@ WHERE
 }
 
 func updateV15(w http.ResponseWriter, r *http.Request, inf *api.APIInfo, reqDS *tc.DeliveryServiceNullableV15) (*tc.DeliveryServiceNullableV15, int, error, error) {
-	dsV30 := tc.DeliveryServiceNullableV30{DeliveryServiceNullableV15: *reqDS}
+	dsV30 := tc.DeliveryServiceV30{DeliveryServiceNullableV15: *reqDS}
 	// query the DB for existing 3.0 fields in order to "upgrade" this 1.5 request into a 3.0 request
 	query := `
 SELECT
@@ -731,15 +790,40 @@ WHERE
 	return nil, status, userErr, sysErr
 }
 
-func updateV30(w http.ResponseWriter, r *http.Request, inf *api.APIInfo, ds *tc.DeliveryServiceNullableV30) (*tc.DeliveryServiceNullableV30, int, error, error) {
+func updateV30(w http.ResponseWriter, r *http.Request, inf *api.APIInfo, dsV30 *tc.DeliveryServiceV30) (*tc.DeliveryServiceV30, int, error, error) {
+	dsV31 := tc.DeliveryServiceV31{DeliveryServiceV30: *dsV30}
+	// query the DB for existing 3.1 fields in order to "upgrade" this 3.0 request into a 3.1 request
+	query := `
+SELECT
+  ds.max_request_header_bytes
+FROM
+  deliveryservice ds
+WHERE
+  ds.id = $1`
+	if err := inf.Tx.Tx.QueryRow(query, *dsV30.ID).Scan(
+		&dsV31.MaxRequestHeaderBytes,
+	); err != nil {
+		if err == sql.ErrNoRows {
+			return nil, http.StatusNotFound, fmt.Errorf("delivery service ID %d not found", *dsV31.ID), nil
+		}
+		return nil, http.StatusInternalServerError, nil, fmt.Errorf("querying delivery service ID %d: %s", *dsV31.ID, err.Error())
+	}
+	res, status, userErr, sysErr := updateV31(w, r, inf, &dsV31)
+	if res != nil {
+		return &res.DeliveryServiceV30, status, userErr, sysErr
+	}
+	return nil, status, userErr, sysErr
+}
+
+func updateV31(w http.ResponseWriter, r *http.Request, inf *api.APIInfo, dsV31 *tc.DeliveryServiceV31) (*tc.DeliveryServiceV31, int, error, error) {
 	tx := inf.Tx.Tx
 	user := inf.User
-
+	ds := tc.DeliveryServiceNullableV30(*dsV31)
 	if err := ds.Validate(tx); err != nil {
 		return nil, http.StatusBadRequest, errors.New("invalid request: " + err.Error()), nil
 	}
 
-	if authorized, err := isTenantAuthorized(inf, ds); err != nil {
+	if authorized, err := isTenantAuthorized(inf, &ds); err != nil {
 		return nil, http.StatusInternalServerError, nil, errors.New("checking tenant: " + err.Error())
 	} else if !authorized {
 		return nil, http.StatusForbidden, errors.New("not authorized on this tenant"), nil
@@ -782,7 +866,7 @@ func updateV30(w http.ResponseWriter, r *http.Request, inf *api.APIInfo, ds *tc.
 		return nil, errCode, userErr, sysErr
 	}
 
-	if errCode, userErr, sysErr = dbhelpers.CheckTopology(inf.Tx, *ds); userErr != nil || sysErr != nil {
+	if errCode, userErr, sysErr = dbhelpers.CheckTopology(inf.Tx, ds); userErr != nil || sysErr != nil {
 		return nil, errCode, userErr, sysErr
 	}
 
@@ -863,6 +947,7 @@ func updateV30(w http.ResponseWriter, r *http.Request, inf *api.APIInfo, ds *tc.
 		&ds.InnerHeaderRewrite,
 		&ds.LastHeaderRewrite,
 		&ds.ServiceCategory,
+		&ds.MaxRequestHeaderBytes,
 		&ds.ID)
 
 	if err != nil {
@@ -937,7 +1022,7 @@ func updateV30(w http.ResponseWriter, r *http.Request, inf *api.APIInfo, ds *tc.
 		return nil, http.StatusInternalServerError, nil, errors.New("ensuring ds parameters:: " + err.Error())
 	}
 
-	if err := updatePrimaryOrigin(tx, user, *ds); err != nil {
+	if err := updatePrimaryOrigin(tx, user, ds); err != nil {
 		return nil, http.StatusInternalServerError, nil, errors.New("updating delivery service: " + err.Error())
 	}
 
@@ -961,7 +1046,8 @@ func updateV30(w http.ResponseWriter, r *http.Request, inf *api.APIInfo, ds *tc.
 	if err := api.CreateChangeLogRawErr(api.ApiChange, "Updated ds: "+*ds.XMLID+" id: "+strconv.Itoa(*ds.ID), user, tx); err != nil {
 		return nil, http.StatusInternalServerError, nil, errors.New("writing change log entry: " + err.Error())
 	}
-	return ds, http.StatusOK, nil, nil
+	dsV31 = (*tc.DeliveryServiceV31)(&ds)
+	return dsV31, http.StatusOK, nil, nil
 }
 
 //Delete is the DeliveryService implementation of the Deleter interface.
@@ -1075,7 +1161,6 @@ func readGetDeliveryServices(h http.Header, params map[string]string, tx *sqlx.T
 		queryValues["accessibleTo"] = pq.Array(accessibleTenants)
 	}
 	query := selectQuery() + where + orderBy + pagination
-
 	log.Debugln("generated deliveryServices query: " + query)
 	log.Debugf("executing with values: %++v\n", queryValues)
 
@@ -1266,6 +1351,7 @@ func GetDeliveryServices(query string, queryValues map[string]interface{}, tx *s
 			&ds.LongDesc2,
 			&ds.MaxDNSAnswers,
 			&ds.MaxOriginConnections,
+			&ds.MaxRequestHeaderBytes,
 			&ds.MidHeaderRewrite,
 			&ds.MissLat,
 			&ds.MissLong,
@@ -1776,6 +1862,7 @@ ds.long_desc_1,
 ds.long_desc_2,
 ds.max_dns_answers,
 ds.max_origin_connections,
+ds.max_request_header_bytes,
 ds.mid_header_rewrite,
 COALESCE(ds.miss_lat, 0.0),
 COALESCE(ds.miss_long, 0.0),
@@ -1881,8 +1968,9 @@ topology=$55,
 first_header_rewrite=$56,
 inner_header_rewrite=$57,
 last_header_rewrite=$58,
-service_category=$59
-WHERE id=$60
+service_category=$59,
+max_request_header_bytes=$60
+WHERE id=$61
 RETURNING last_updated
 `
 }
@@ -1948,9 +2036,10 @@ range_slice_block_size,
 first_header_rewrite,
 inner_header_rewrite,
 last_header_rewrite,
-service_category
+service_category,
+max_request_header_bytes
 )
-VALUES ($1,$2,$3,$4,$5,$6,$7,$8,$9,$10,$11,$12,$13,$14,$15,$16,$17,$18,$19,$20,$21,$22,$23,$24,$25,$26,$27,$28,$29,$30,$31,$32,$33,$34,$35,$36,$37,$38,$39,$40,$41,$42,$43,$44,$45,$46,$47,$48,$49,$50,$51,$52,$53,$54,$55,$56,$57,$58,$59)
+VALUES ($1,$2,$3,$4,$5,$6,$7,$8,$9,$10,$11,$12,$13,$14,$15,$16,$17,$18,$19,$20,$21,$22,$23,$24,$25,$26,$27,$28,$29,$30,$31,$32,$33,$34,$35,$36,$37,$38,$39,$40,$41,$42,$43,$44,$45,$46,$47,$48,$49,$50,$51,$52,$53,$54,$55,$56,$57,$58,$59,$60)
 RETURNING id, last_updated
 `
 }
diff --git a/traffic_ops/traffic_ops_golang/routing/routes.go b/traffic_ops/traffic_ops_golang/routing/routes.go
index def9be5..7e98b33 100644
--- a/traffic_ops/traffic_ops_golang/routing/routes.go
+++ b/traffic_ops/traffic_ops_golang/routing/routes.go
@@ -145,6 +145,9 @@ func Routes(d ServerData) ([]Route, []RawRoute, http.Handler, error) {
 		/**
 		 * 3.x API
 		 */
+		////DeliveryServices
+		{api.Version{3, 1}, http.MethodPost, `deliveryservices/?$`, deliveryservice.CreateV31, auth.PrivLevelOperations, Authenticated, nil, 2064315323, noPerlBypass},
+		{api.Version{3, 1}, http.MethodPut, `deliveryservices/{id}/?$`, deliveryservice.UpdateV31, auth.PrivLevelOperations, Authenticated, nil, 27665675673, noPerlBypass},
 
 		// Acme account information
 		{api.Version{3, 1}, http.MethodGet, `acme_accounts/?$`, acme.Read, auth.PrivLevelAdmin, Authenticated, nil, 2034390561, noPerlBypass},
diff --git a/traffic_ops/v3-client/endpoints.go b/traffic_ops/v3-client/endpoints.go
index 26c2593..161f252 100644
--- a/traffic_ops/v3-client/endpoints.go
+++ b/traffic_ops/v3-client/endpoints.go
@@ -15,4 +15,4 @@
 
 package client
 
-const apiBase = "/api/3.0"
+const apiBase = "/api/3.1"
diff --git a/traffic_portal/app/src/common/modules/form/deliveryService/form.deliveryService.DNS.tpl.html b/traffic_portal/app/src/common/modules/form/deliveryService/form.deliveryService.DNS.tpl.html
index 2a3dfc2..332a9f0 100644
--- a/traffic_portal/app/src/common/modules/form/deliveryService/form.deliveryService.DNS.tpl.html
+++ b/traffic_portal/app/src/common/modules/form/deliveryService/form.deliveryService.DNS.tpl.html
@@ -400,6 +400,23 @@ under the License.
                             </aside>
                         </div>
                     </div>
+                    <div class="form-group" ng-class="{'has-error': hasError(cacheConfig.maxRequestHeaderBytes), 'has-feedback': hasError(cacheConfig.maxRequestHeaderBytes)}">
+                        <label class="has-tooltip control-label col-md-2 col-sm-2 col-xs-12" for="maxRequestHeaderBytes">Max Request Header Bytes<div class="helptooltip">
+                                <div class="helptext">
+                                    The maximum size (in bytes) of the request headers for this particular delivery service. Clearing this will result in the default (131072) being set for this DS.
+                                </div>
+                            </div>
+                        </label>
+                        <div class="col-md-10 col-sm-10 col-xs-12">
+                            <input id="maxRequestHeaderBytes" name="maxRequestHeaderBytes" type="number" class="form-control" ng-model="deliveryService.maxRequestHeaderBytes" step="1" min="1" max="2147483647">
+                            <small class="input-error" ng-show="hasPropertyError(cacheConfig.maxRequestHeaderBytes, 'min')">Too Small (must be greater than or equal to 1)</small>
+                            <small class="input-error" ng-show="hasPropertyError(cacheConfig.maxRequestHeaderBytes, 'max')">Too Big (must be lesser than or equal to 2147483647)</small>
+                            <aside class="current-value" ng-if="settings.isRequest" ng-show="open() && deliveryService.maxRequestHeaderBytes != dsCurrent.maxRequestHeaderBytes">
+                                <h3>Current Value</h3>
+                                <pre>{{::dsCurrent.maxRequestHeaderBytes}}</pre>
+                            </aside>
+                        </div>
+                    </div>
                     <div class="form-group" ng-class="{'has-error': hasError(cacheConfig.signingAlgorithm), 'has-feedback': hasError(cacheConfig.signingAlgorithm)}">
                         <label class="has-tooltip control-label col-md-2 col-sm-2 col-xs-12" for="signingAlgorithm">Signing Algorithm<div class="helptooltip">
                             <div class="helptext">
diff --git a/traffic_portal/app/src/common/modules/form/deliveryService/form.deliveryService.HTTP.tpl.html b/traffic_portal/app/src/common/modules/form/deliveryService/form.deliveryService.HTTP.tpl.html
index 7a62347..3bc424f 100644
--- a/traffic_portal/app/src/common/modules/form/deliveryService/form.deliveryService.HTTP.tpl.html
+++ b/traffic_portal/app/src/common/modules/form/deliveryService/form.deliveryService.HTTP.tpl.html
@@ -400,6 +400,23 @@ under the License.
                             </aside>
                         </div>
                     </div>
+                    <div class="form-group" ng-class="{'has-error': hasError(cacheConfig.maxRequestHeaderBytes), 'has-feedback': hasError(cacheConfig.maxRequestHeaderBytes)}">
+                        <label class="has-tooltip control-label col-md-2 col-sm-2 col-xs-12" for="maxRequestHeaderBytes">Max Request Header Bytes<div class="helptooltip">
+                                <div class="helptext">
+                                    The maximum size (in bytes) of the request headers for this particular delivery service. Clearing this will result in the default (131072) being set for this DS.
+                                </div>
+                            </div>
+                        </label>
+                        <div class="col-md-10 col-sm-10 col-xs-12">
+                            <input id="maxRequestHeaderBytes" name="maxRequestHeaderBytes" type="number" class="form-control" ng-model="deliveryService.maxRequestHeaderBytes" step="1" min="1" max="2147483647">
+                            <small class="input-error" ng-show="hasPropertyError(cacheConfig.maxRequestHeaderBytes, 'min')">Too Small (must be greater than or equal to 1)</small>
+                            <small class="input-error" ng-show="hasPropertyError(cacheConfig.maxRequestHeaderBytes, 'max')">Too Big (must be lesser than or equal to 2147483647)</small>
+                            <aside class="current-value" ng-if="settings.isRequest" ng-show="open() && deliveryService.maxRequestHeaderBytes != dsCurrent.maxRequestHeaderBytes">
+                                <h3>Current Value</h3>
+                                <pre>{{::dsCurrent.maxRequestHeaderBytes}}</pre>
+                            </aside>
+                        </div>
+                    </div>
                     <div class="form-group" ng-class="{'has-error': hasError(cacheConfig.signingAlgorithm), 'has-feedback': hasError(cacheConfig.signingAlgorithm)}">
                         <label class="has-tooltip control-label col-md-2 col-sm-2 col-xs-12" for="signingAlgorithm">Signing Algorithm<div class="helptooltip">
                             <div class="helptext">
diff --git a/traffic_portal/app/src/common/modules/table/cdnDeliveryServices/table.cdnDeliveryServices.tpl.html b/traffic_portal/app/src/common/modules/table/cdnDeliveryServices/table.cdnDeliveryServices.tpl.html
index 461deff..1aff3fc 100644
--- a/traffic_portal/app/src/common/modules/table/cdnDeliveryServices/table.cdnDeliveryServices.tpl.html
+++ b/traffic_portal/app/src/common/modules/table/cdnDeliveryServices/table.cdnDeliveryServices.tpl.html
@@ -86,6 +86,7 @@ under the License.
                     <th>Long Desc 3</th>
                     <th>Max DNS Answers</th>
                     <th>Max Origin Connections</th>
+                    <th>Max Request Header Bytes</th>
                     <th>Mid Header Rewrite Rules</th>
                     <th>Multi-Site Origin</th>
                     <th>Origin Shield</th>
@@ -151,6 +152,7 @@ under the License.
                     <td data-search="^{{::ds.longDesc2}}$">{{::ds.longDesc2}}</td>
                     <td data-search="^{{::ds.maxDnsAnswers}}$">{{::ds.maxDnsAnswers}}</td>
                     <td data-search="^{{::ds.maxOriginConnections}}$">{{::ds.maxOriginConnections}}</td>
+                    <td data-search="^{{::ds.maxRequestHeaderBytes}}$">{{::ds.maxRequestHeaderBytes}}</td>
                     <td data-search="^{{::ds.midHeaderRewrite}}$">{{::ds.midHeaderRewrite}}</td>
                     <td data-search="^{{::ds.multiSiteOrigin}}$">{{::ds.multiSiteOrigin}}</td>
                     <td data-search="^{{::ds.originShield}}$">{{::ds.originShield}}</td>
diff --git a/traffic_portal/app/src/common/modules/table/deliveryServices/TableDeliveryServicesController.js b/traffic_portal/app/src/common/modules/table/deliveryServices/TableDeliveryServicesController.js
index 00bbaa5..2b03fcb 100644
--- a/traffic_portal/app/src/common/modules/table/deliveryServices/TableDeliveryServicesController.js
+++ b/traffic_portal/app/src/common/modules/table/deliveryServices/TableDeliveryServicesController.js
@@ -252,6 +252,7 @@ var TableDeliveryServicesController = function(deliveryServices, $anchorScroll,
         { "name": "Long Desc 3", "visible": false, "searchable": false },
         { "name": "Max DNS Answers", "visible": false, "searchable": false },
         { "name": "Max Origin Connections", "visible": false, "searchable": false },
+        { "name": "Max Request Header Bytes", "visible": false, "searchable": false },
         { "name": "Mid Header Rewrite Rules", "visible": false, "searchable": false },
         { "name": "Multi-Site Origin", "visible": false, "searchable": false },
         { "name": "Origin Shield", "visible": false, "searchable": false },
diff --git a/traffic_portal/app/src/common/modules/table/deliveryServices/table.deliveryServices.tpl.html b/traffic_portal/app/src/common/modules/table/deliveryServices/table.deliveryServices.tpl.html
index a4bb4f4..a4c8586 100644
--- a/traffic_portal/app/src/common/modules/table/deliveryServices/table.deliveryServices.tpl.html
+++ b/traffic_portal/app/src/common/modules/table/deliveryServices/table.deliveryServices.tpl.html
@@ -94,6 +94,7 @@ under the License.
                     <th>Long Desc 3</th>
                     <th>Max DNS Answers</th>
                     <th>Max Origin Connections</th>
+                    <th>Max Request Header Bytes</th>
                     <th>Mid Header Rewrite Rules</th>
                     <th>Multi-Site Origin</th>
                     <th>Origin Shield</th>
@@ -159,6 +160,7 @@ under the License.
                     <td data-search="^{{::ds.longDesc2}}$">{{::ds.longDesc2}}</td>
                     <td data-search="^{{::ds.maxDnsAnswers}}$">{{::ds.maxDnsAnswers}}</td>
                     <td data-search="^{{::ds.maxOriginConnections}}$">{{::ds.maxOriginConnections}}</td>
+                    <td data-search="^{{::ds.maxRequestHeaderBytes}}$">{{::ds.maxRequestHeaderBytes}}</td>
                     <td data-search="^{{::ds.midHeaderRewrite}}$">{{::ds.midHeaderRewrite}}</td>
                     <td data-search="^{{::ds.multiSiteOrigin}}$">{{::ds.multiSiteOrigin}}</td>
                     <td data-search="^{{::ds.originShield}}$">{{::ds.originShield}}</td>
diff --git a/traffic_portal/app/src/common/modules/table/profileDeliveryServices/table.profileDeliveryServices.tpl.html b/traffic_portal/app/src/common/modules/table/profileDeliveryServices/table.profileDeliveryServices.tpl.html
index 4ca128a..9383688 100644
--- a/traffic_portal/app/src/common/modules/table/profileDeliveryServices/table.profileDeliveryServices.tpl.html
+++ b/traffic_portal/app/src/common/modules/table/profileDeliveryServices/table.profileDeliveryServices.tpl.html
@@ -86,6 +86,7 @@ under the License.
                     <th>Long Desc 3</th>
                     <th>Max DNS Answers</th>
                     <th>Max Origin Connections</th>
+                    <th>Max Request Header Bytes</th>
                     <th>Mid Header Rewrite Rules</th>
                     <th>Multi-Site Origin</th>
                     <th>Origin Shield</th>
@@ -151,6 +152,7 @@ under the License.
                     <td data-search="^{{::ds.longDesc2}}$">{{::ds.longDesc2}}</td>
                     <td data-search="^{{::ds.maxDnsAnswers}}$">{{::ds.maxDnsAnswers}}</td>
                     <td data-search="^{{::ds.maxOriginConnections}}$">{{::ds.maxOriginConnections}}</td>
+                    <td data-search="^{{::ds.maxRequestHeaderBytes}}$">{{::ds.maxRequestHeaderBytes}}</td>
                     <td data-search="^{{::ds.midHeaderRewrite}}$">{{::ds.midHeaderRewrite}}</td>
                     <td data-search="^{{::ds.multiSiteOrigin}}$">{{::ds.multiSiteOrigin}}</td>
                     <td data-search="^{{::ds.originShield}}$">{{::ds.originShield}}</td>
diff --git a/traffic_portal/app/src/common/modules/table/serverCapabilityDeliveryServices/table.serverCapabilityDeliveryServices.tpl.html b/traffic_portal/app/src/common/modules/table/serverCapabilityDeliveryServices/table.serverCapabilityDeliveryServices.tpl.html
index 5693622..232c57c 100644
--- a/traffic_portal/app/src/common/modules/table/serverCapabilityDeliveryServices/table.serverCapabilityDeliveryServices.tpl.html
+++ b/traffic_portal/app/src/common/modules/table/serverCapabilityDeliveryServices/table.serverCapabilityDeliveryServices.tpl.html
@@ -34,7 +34,7 @@ under the License.
         <table id="serverCapabilityDeliveryServicesTable" class="table responsive-utilities jambo_table">
             <thead>
             <tr>
-                <th>Host</th>
+                <th>XML ID (Key)</th>
                 <th></th>
             </tr>
             </thead>
diff --git a/traffic_portal/app/src/common/modules/table/serverDeliveryServices/table.serverDeliveryServices.tpl.html b/traffic_portal/app/src/common/modules/table/serverDeliveryServices/table.serverDeliveryServices.tpl.html
index fc6c78b..9336d92 100644
--- a/traffic_portal/app/src/common/modules/table/serverDeliveryServices/table.serverDeliveryServices.tpl.html
+++ b/traffic_portal/app/src/common/modules/table/serverDeliveryServices/table.serverDeliveryServices.tpl.html
@@ -96,6 +96,7 @@ under the License.
                     <th>Long Desc 3</th>
                     <th>Max DNS Answers</th>
                     <th>Max Origin Connections</th>
+                    <th>Max Request Header Bytes</th>
                     <th>Mid Header Rewrite Rules</th>
                     <th>Multi-Site Origin</th>
                     <th>Origin Shield</th>
@@ -162,6 +163,7 @@ under the License.
                     <td data-search="^{{::ds.longDesc2}}$">{{::ds.longDesc2}}</td>
                     <td data-search="^{{::ds.maxDnsAnswers}}$">{{::ds.maxDnsAnswers}}</td>
                     <td data-search="^{{::ds.maxOriginConnections}}$">{{::ds.maxOriginConnections}}</td>
+                    <td data-search="^{{::ds.maxRequestHeaderBytes}}$">{{::ds.maxRequestHeaderBytes}}</td>
                     <td data-search="^{{::ds.midHeaderRewrite}}$">{{::ds.midHeaderRewrite}}</td>
                     <td data-search="^{{::ds.multiSiteOrigin}}$">{{::ds.multiSiteOrigin}}</td>
                     <td data-search="^{{::ds.originShield}}$">{{::ds.originShield}}</td>
diff --git a/traffic_portal/app/src/common/modules/table/serviceCategoryDeliveryServices/table.serviceCategoryDeliveryServices.tpl.html b/traffic_portal/app/src/common/modules/table/serviceCategoryDeliveryServices/table.serviceCategoryDeliveryServices.tpl.html
index d329571..77a5a05 100644
--- a/traffic_portal/app/src/common/modules/table/serviceCategoryDeliveryServices/table.serviceCategoryDeliveryServices.tpl.html
+++ b/traffic_portal/app/src/common/modules/table/serviceCategoryDeliveryServices/table.serviceCategoryDeliveryServices.tpl.html
@@ -86,6 +86,7 @@ under the License.
                     <th>Long Desc 3</th>
                     <th>Max DNS Answers</th>
                     <th>Max Origin Connections</th>
+                    <th>Max Request Header Bytes</th>
                     <th>Mid Header Rewrite Rules</th>
                     <th>Multi-Site Origin</th>
                     <th>Origin Shield</th>
@@ -151,6 +152,7 @@ under the License.
                     <td data-search="^{{::ds.longDesc2}}$">{{::ds.longDesc2}}</td>
                     <td data-search="^{{::ds.maxDnsAnswers}}$">{{::ds.maxDnsAnswers}}</td>
                     <td data-search="^{{::ds.maxOriginConnections}}$">{{::ds.maxOriginConnections}}</td>
+                    <td data-search="^{{::ds.maxRequestHeaderBytes}}$">{{::ds.maxRequestHeaderBytes}}</td>
                     <td data-search="^{{::ds.midHeaderRewrite}}$">{{::ds.midHeaderRewrite}}</td>
                     <td data-search="^{{::ds.multiSiteOrigin}}$">{{::ds.multiSiteOrigin}}</td>
                     <td data-search="^{{::ds.originShield}}$">{{::ds.originShield}}</td>
diff --git a/traffic_portal/app/src/common/modules/table/tenantDeliveryServices/table.tenantDeliveryServices.tpl.html b/traffic_portal/app/src/common/modules/table/tenantDeliveryServices/table.tenantDeliveryServices.tpl.html
index 8be2c6d..a92fdc9 100644
--- a/traffic_portal/app/src/common/modules/table/tenantDeliveryServices/table.tenantDeliveryServices.tpl.html
+++ b/traffic_portal/app/src/common/modules/table/tenantDeliveryServices/table.tenantDeliveryServices.tpl.html
@@ -86,6 +86,7 @@ under the License.
                     <th>Long Desc 3</th>
                     <th>Max DNS Answers</th>
                     <th>Max Origin Connections</th>
+                    <th>Max Request Header Bytes</th>
                     <th>Mid Header Rewrite Rules</th>
                     <th>Multi-Site Origin</th>
                     <th>Origin Shield</th>
@@ -151,6 +152,7 @@ under the License.
                     <td data-search="^{{::ds.longDesc2}}$">{{::ds.longDesc2}}</td>
                     <td data-search="^{{::ds.maxDnsAnswers}}$">{{::ds.maxDnsAnswers}}</td>
                     <td data-search="^{{::ds.maxOriginConnections}}$">{{::ds.maxOriginConnections}}</td>
+                    <td data-search="^{{::ds.maxRequestHeaderBytes}}$">{{::ds.maxRequestHeaderBytes}}</td>
                     <td data-search="^{{::ds.midHeaderRewrite}}$">{{::ds.midHeaderRewrite}}</td>
                     <td data-search="^{{::ds.multiSiteOrigin}}$">{{::ds.multiSiteOrigin}}</td>
                     <td data-search="^{{::ds.originShield}}$">{{::ds.originShield}}</td>
diff --git a/traffic_portal/app/src/common/modules/table/topologyDeliveryServices/table.topologyDeliveryServices.tpl.html b/traffic_portal/app/src/common/modules/table/topologyDeliveryServices/table.topologyDeliveryServices.tpl.html
index acd9ee8..c1efad0 100644
--- a/traffic_portal/app/src/common/modules/table/topologyDeliveryServices/table.topologyDeliveryServices.tpl.html
+++ b/traffic_portal/app/src/common/modules/table/topologyDeliveryServices/table.topologyDeliveryServices.tpl.html
@@ -86,6 +86,7 @@ under the License.
                 <th>Long Desc 3</th>
                 <th>Max DNS Answers</th>
                 <th>Max Origin Connections</th>
+                <th>Max Request Header Bytes</th>
                 <th>Mid Header Rewrite Rules</th>
                 <th>Multi-Site Origin</th>
                 <th>Origin Shield</th>
@@ -151,6 +152,7 @@ under the License.
                 <td data-search="^{{::ds.longDesc2}}$">{{::ds.longDesc2}}</td>
                 <td data-search="^{{::ds.maxDnsAnswers}}$">{{::ds.maxDnsAnswers}}</td>
                 <td data-search="^{{::ds.maxOriginConnections}}$">{{::ds.maxOriginConnections}}</td>
+                <td data-search="^{{::ds.maxRequestHeaderBytes}}$">{{::ds.maxRequestHeaderBytes}}</td>
                 <td data-search="^{{::ds.midHeaderRewrite}}$">{{::ds.midHeaderRewrite}}</td>
                 <td data-search="^{{::ds.multiSiteOrigin}}$">{{::ds.multiSiteOrigin}}</td>
                 <td data-search="^{{::ds.originShield}}$">{{::ds.originShield}}</td>
diff --git a/traffic_portal/app/src/common/modules/table/typeDeliveryServices/table.typeDeliveryServices.tpl.html b/traffic_portal/app/src/common/modules/table/typeDeliveryServices/table.typeDeliveryServices.tpl.html
index a6e93c7..99aeaff 100644
--- a/traffic_portal/app/src/common/modules/table/typeDeliveryServices/table.typeDeliveryServices.tpl.html
+++ b/traffic_portal/app/src/common/modules/table/typeDeliveryServices/table.typeDeliveryServices.tpl.html
@@ -86,6 +86,7 @@ under the License.
                     <th>Long Desc 3</th>
                     <th>Max DNS Answers</th>
                     <th>Max Origin Connections</th>
+                    <th>Max Request Header Bytes</th>
                     <th>Mid Header Rewrite Rules</th>
                     <th>Multi-Site Origin</th>
                     <th>Origin Shield</th>
@@ -151,6 +152,7 @@ under the License.
                     <td data-search="^{{::ds.longDesc2}}$">{{::ds.longDesc2}}</td>
                     <td data-search="^{{::ds.maxDnsAnswers}}$">{{::ds.maxDnsAnswers}}</td>
                     <td data-search="^{{::ds.maxOriginConnections}}$">{{::ds.maxOriginConnections}}</td>
+                    <td data-search="^{{::ds.maxRequestHeaderBytes}}$">{{::ds.maxRequestHeaderBytes}}</td>
                     <td data-search="^{{::ds.midHeaderRewrite}}$">{{::ds.midHeaderRewrite}}</td>
                     <td data-search="^{{::ds.multiSiteOrigin}}$">{{::ds.multiSiteOrigin}}</td>
                     <td data-search="^{{::ds.originShield}}$">{{::ds.originShield}}</td>
diff --git a/traffic_portal/app/src/scripts/config.js b/traffic_portal/app/src/scripts/config.js
index ea59c4f..ad6c508 100644
--- a/traffic_portal/app/src/scripts/config.js
+++ b/traffic_portal/app/src/scripts/config.js
@@ -23,6 +23,6 @@
 
 angular.module('config', [])
 
-.constant('ENV', { api: { root:'/api/3.0/', legacy: '/api/1.5/' } })
+.constant('ENV', { api: { root:'/api/3.1/', legacy: '/api/1.5/' } })
 
 ;
diff --git a/traffic_portal/app/src/traffic_portal_properties.json b/traffic_portal/app/src/traffic_portal_properties.json
index 3766f42..a01e581 100644
--- a/traffic_portal/app/src/traffic_portal_properties.json
+++ b/traffic_portal/app/src/traffic_portal_properties.json
@@ -142,7 +142,8 @@
           "ccrDnsTtl": 30,
           "regionalGeoBlocking": false,
           "anonymousBlockingEnabled": false,
-          "ecsEnabled": false
+          "ecsEnabled": false,
+          "maxRequestHeaderBytes": 131072
         },
         "HTTP": {
           "routingName": "cdn",
@@ -164,7 +165,8 @@
           "ccrDnsTtl": 3600,
           "anonymousBlockingEnabled": false,
           "consistentHashQueryParams": [],
-          "ecsEnabled": false
+          "ecsEnabled": false,
+          "maxRequestHeaderBytes": 131072
         },
         "STEERING": {
           "dscp": 0,
diff --git a/traffic_portal/package-lock.json b/traffic_portal/package-lock.json
index e593e58..f5a220e 100644
--- a/traffic_portal/package-lock.json
+++ b/traffic_portal/package-lock.json
@@ -1,7 +1,8 @@
 {
   "name": "traffic_portal",
-  "requires": true,
+  "version": "5.0.0",
   "lockfileVersion": 1,
+  "requires": true,
   "dependencies": {
     "@coolaj86/urequest": {
       "version": "1.3.7",