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

org.openfact.models.BrowserSecurityHeaders Maven / Gradle / Ivy

The newest version!
package org.openfact.models;

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

public class BrowserSecurityHeaders {
    public static final Map headerAttributeMap;
    public static final Map defaultHeaders;

    static {
        Map headerMap = new HashMap<>();
        headerMap.put("xFrameOptions", "X-Frame-Options");
        headerMap.put("contentSecurityPolicy", "Content-Security-Policy");
        headerMap.put("xContentTypeOptions", "X-Content-Type-Options");

        Map dh = new HashMap<>();
        dh.put("xFrameOptions", "SAMEORIGIN");
        dh.put("contentSecurityPolicy", "frame-src 'self'");
        dh.put("xContentTypeOptions", "nosniff");

        defaultHeaders = Collections.unmodifiableMap(dh);
        headerAttributeMap = Collections.unmodifiableMap(headerMap);
    }
}




© 2015 - 2024 Weber Informatics LLC | Privacy Policy