All Downloads are FREE. Search and download functionalities are using the official Maven repository.

io.higgs.http.server.config.FilesConfig Maven / Gradle / Ivy

There is a newer version: 0.0.24
Show newest version
package io.higgs.http.server.config;

import java.util.HashMap;
import java.util.Map;

/**
 * @author Courtney Robinson 
 */
public class FilesConfig {
    public boolean delete_temp_on_exit = true;
    //use default system temp dir if null
    public String temp_directory;
    //how big are the chunks when sending a file
    public int chunk_size = 8192;
    public String public_directory = "public";
    public boolean enable_directory_listing = true;
    public boolean serve_index_file = true;
    public String index_file = "/index.html";
    //colon separates each, comma, separates multiple extensions
    public Map custom_mime_types = new HashMap<>();

    public FilesConfig() {
        //add some default mime types
        custom_mime_types.put("htm,html", "text/html");
        custom_mime_types.put("json", "application/json");
        custom_mime_types.put("xml", "application/xml");
        custom_mime_types.put("png", "image/png");
        custom_mime_types.put("css", "text/css");
        custom_mime_types.put("js", "text/javascript");
    }
}




© 2015 - 2024 Weber Informatics LLC | Privacy Policy