File tree Expand file tree Collapse file tree 1 file changed +19
-0
lines changed Expand file tree Collapse file tree 1 file changed +19
-0
lines changed Original file line number Diff line number Diff line change @@ -705,6 +705,11 @@ provided by Symfony:
705705 site_name : ' ACME'
706706 theme : ' dark'
707707
708+ # optionally you can define HTTP headers to add to the response
709+ headers :
710+ Content-Type : ' text/html'
711+ foo : ' bar'
712+
708713 .. code-block :: xml
709714
710715 <!-- config/routes.xml -->
@@ -734,6 +739,11 @@ provided by Symfony:
734739 <default key =" site_name" >ACME</default >
735740 <default key =" theme" >dark</default >
736741 </default >
742+
743+ <!-- optionally you can define HTTP headers to add to the response -->
744+ <default key =" headers" >
745+ <default key =" Content-Type" >text/html</default >
746+ </default >
737747 </route >
738748 </routes >
739749
@@ -764,11 +774,20 @@ provided by Symfony:
764774 'context' => [
765775 'site_name' => 'ACME',
766776 'theme' => 'dark',
777+ ],
778+
779+ // optionally you can define HTTP headers to add to the response
780+ 'headers' => [
781+ 'Content-Type' => 'text/html',
767782 ]
768783 ])
769784 ;
770785 };
771786
787+ .. versionadded :: 7.2
788+
789+ The ``headers `` option was introduced in Symfony 7.2.
790+
772791Checking if a Template Exists
773792~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
774793
You can’t perform that action at this time.
0 commit comments