Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.
Comment: Fix broken anchor links

...

Advanced Tables - Table Plus
enableHeadingAttributesfalse
enableSortingfalse
classm5-configuration-tree
enableHighlightingfalse
Node namevalue

Mgnl f
server

 

Mgnl f
MIMEMapping

 


Mgnl n
html

 

Mgnl p
mime-type

text/html

Mgnl n
foobar

 

Mgnl p
mime-type

application/x-javascript

Mgnl p
ext

js

...

(warning) Since Magnolia 5.4.5+, ContentTypeFilter is no more setting the response content type, instead it's the responsibility of renderers/servlets to set correct content type (for instance 

Javadoc resource link
rangeHigherVersion5.6
classNameinfo.magnolia.rendering.renderer.FreemarkerRenderer
renderTypeasynchronous
 sets the content type). However, ContentTypeFilter sets some parameters onto
Javadoc resource link
0info.magnolia.cms.core.AggregationState
rangeHigherVersion5.6
classNameinfo.magnolia.cms.core.AggregationState
renderTypeasynchronous
and takes care of restricting responses to configured MIME types and matching requests to content types..

Restricting responses to configured MIME types

...

Advanced Tables - Table Plus
enableHeadingAttributesfalse
enableSortingfalse
classm5-configuration-tree
enableHighlightingfalse
Node namevalue

Mgnl f
server

 

Mgnl f
filters

 

Mgnl f
contentType

 

Mgnl p
class

info.magnolia.cms.filters.ContentTypeFilter

Mgnl p
enabled

true

Mgnl p
registeredExtensionsOnly

true

...

Example: If you request https://demopublic.magnolia-cms.com/travel.c, the HTML source is returned because of the text/plain MIME mapping in /server/MIMEMapping/c

To force content type matching, add the validateContentType property in server/filters/contentType and set the value to true.

Advanced Tables - Table Plus
enableHeadingAttributesfalse
enableSortingfalse
classm5-configuration-tree
enableHighlightingfalse
Node namevalue

Mgnl f
server

 


Mgnl f
filters

 

Mgnl f
contentType

 


Mgnl p
class

info.magnolia.cms.filters.ContentTypeFilter

Mgnl p
enabled

true

Mgnl p
registeredExtensionsOnly

true

Mgnl p
validateContentType

true

...