content: /**
   * Copyright (c) 2010-present Abixen Systems. All rights reserved.
   * <p>
   * This library is free software; you can redistribute it and/or modify it under
   * the terms of the GNU Lesser General Public License as published by the Free
   * Software Foundation; either version 2.1 of the License, or (at your option)
   * any later version.
   * <p>
   * This library is distributed in the hope that it will be useful, but WITHOUT
   * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS
   * FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License for more
   * details.
   */
  
  package com.abixen.platform.client.web.configuration;
  
  import org.springframework.boot.web.server.MimeMappings;
  import org.springframework.boot.web.server.WebServerFactoryCustomizer;
  import org.springframework.boot.web.servlet.server.ConfigurableServletWebServerFactory;
  import org.springframework.context.annotation.Configuration;
  
  @Configuration
  public class PlatformWebFontMimeMapper implements WebServerFactoryCustomizer<ConfigurableServletWebServerFactory> {
      @Override
      public void customize(final ConfigurableServletWebServerFactory factory) {
          final MimeMappings mappings = new MimeMappings(MimeMappings.DEFAULT);
          mappings.add("woff", "application/font-woff");
          mappings.add("woff2", "application/font-woff2");
          mappings.add("ttf", "application/x-font-truetype");
          mappings.add("eot", "application/vnd.ms-fontobject");
          mappings.add("svg", "image/svg+xml");
          mappings.add("otf", "application/x-font-opentype");
          factory.setMimeMappings(mappings);
      }
  
  }
  