0 Replies Latest reply on Feb 20, 2017 10:17 AM by Rafał Rychlewski

    Dynamic mime mapping Wildfly / Undertow

    Rafał Rychlewski Newbie

      I would like to serve static content. I have configured undertow as Wildfly 10 subsystem. And it works. But it dosent serv mime type in http header. I know that I can use mime mapping, file extension - mime type. But i have mime types in database and files with no extension. Any ideas ?


      <subsystem xmlns="urn:jboss:domain:undertow:3.0">
      <buffer-cache name="default"/>
      <server name="default-server">
      <http-listener name="default" max-post-size="1048576000" socket-binding="http" redirect-socket="https"/>
      <host name="default-host" alias="localhost">
      <location name="/" handler="welcome-content"/>
      <location name="/App/media" handler="media"/>
      <filter-ref name="server-header"/>
      <filter-ref name="x-powered-by-header"/>
      <servlet-container name="default">
      <file name="welcome-content" path="${jboss.home.dir}/welcome-content"/>
      <file name="media" path="/home/deployers/media-data"/>
      <response-header name="server-header" header-name="Server" header-value="WildFly/10"/>
      <response-header name="x-powered-by-header" header-name="X-Powered-By" header-value="Undertow/1"/>