|
@@ -199,6 +199,21 @@ public interface FessConfig extends FessEnv, org.codelibs.fess.mylasta.direction
|
|
|
/** The key of the configuration. e.g. */
|
|
|
String API_DASHBOARD_RESPONSE_HEADERS = "api.dashboard.response.headers";
|
|
|
|
|
|
+ /** The key of the configuration. e.g. * */
|
|
|
+ String API_CORS_ALLOW_ORIGIN = "api.cors.allow.origin";
|
|
|
+
|
|
|
+ /** The key of the configuration. e.g. GET, POST, OPTIONS, DELETE, PUT */
|
|
|
+ String API_CORS_ALLOW_METHODS = "api.cors.allow.methods";
|
|
|
+
|
|
|
+ /** The key of the configuration. e.g. 3600 */
|
|
|
+ String API_CORS_MAX_AGE = "api.cors.max.age";
|
|
|
+
|
|
|
+ /** The key of the configuration. e.g. Origin, Content-Type, Accept, Authorization */
|
|
|
+ String API_CORS_ALLOW_HEADERS = "api.cors.allow.headers";
|
|
|
+
|
|
|
+ /** The key of the configuration. e.g. true */
|
|
|
+ String API_CORS_ALLOW_CREDENTIALS = "api.cors.allow.credentials";
|
|
|
+
|
|
|
/** The key of the configuration. e.g. */
|
|
|
String VIRTUAL_HOST_HEADERS = "virtual.host.headers";
|
|
|
|
|
@@ -1847,6 +1862,56 @@ public interface FessConfig extends FessEnv, org.codelibs.fess.mylasta.direction
|
|
|
*/
|
|
|
Integer getApiDashboardResponseHeadersAsInteger();
|
|
|
|
|
|
+ /**
|
|
|
+ * Get the value for the key 'api.cors.allow.origin'. <br>
|
|
|
+ * The value is, e.g. * <br>
|
|
|
+ * @return The value of found property. (NotNull: if not found, exception but basically no way)
|
|
|
+ */
|
|
|
+ String getApiCorsAllowOrigin();
|
|
|
+
|
|
|
+ /**
|
|
|
+ * Get the value for the key 'api.cors.allow.methods'. <br>
|
|
|
+ * The value is, e.g. GET, POST, OPTIONS, DELETE, PUT <br>
|
|
|
+ * @return The value of found property. (NotNull: if not found, exception but basically no way)
|
|
|
+ */
|
|
|
+ String getApiCorsAllowMethods();
|
|
|
+
|
|
|
+ /**
|
|
|
+ * Get the value for the key 'api.cors.max.age'. <br>
|
|
|
+ * The value is, e.g. 3600 <br>
|
|
|
+ * @return The value of found property. (NotNull: if not found, exception but basically no way)
|
|
|
+ */
|
|
|
+ String getApiCorsMaxAge();
|
|
|
+
|
|
|
+ /**
|
|
|
+ * Get the value for the key 'api.cors.max.age' as {@link Integer}. <br>
|
|
|
+ * The value is, e.g. 3600 <br>
|
|
|
+ * @return The value of found property. (NotNull: if not found, exception but basically no way)
|
|
|
+ * @throws NumberFormatException When the property is not integer.
|
|
|
+ */
|
|
|
+ Integer getApiCorsMaxAgeAsInteger();
|
|
|
+
|
|
|
+ /**
|
|
|
+ * Get the value for the key 'api.cors.allow.headers'. <br>
|
|
|
+ * The value is, e.g. Origin, Content-Type, Accept, Authorization <br>
|
|
|
+ * @return The value of found property. (NotNull: if not found, exception but basically no way)
|
|
|
+ */
|
|
|
+ String getApiCorsAllowHeaders();
|
|
|
+
|
|
|
+ /**
|
|
|
+ * Get the value for the key 'api.cors.allow.credentials'. <br>
|
|
|
+ * The value is, e.g. true <br>
|
|
|
+ * @return The value of found property. (NotNull: if not found, exception but basically no way)
|
|
|
+ */
|
|
|
+ String getApiCorsAllowCredentials();
|
|
|
+
|
|
|
+ /**
|
|
|
+ * Is the property for the key 'api.cors.allow.credentials' true? <br>
|
|
|
+ * The value is, e.g. true <br>
|
|
|
+ * @return The determination, true or false. (if not found, exception but basically no way)
|
|
|
+ */
|
|
|
+ boolean isApiCorsAllowCredentials();
|
|
|
+
|
|
|
/**
|
|
|
* Get the value for the key 'virtual.host.headers'. <br>
|
|
|
* The value is, e.g. <br>
|
|
@@ -6202,6 +6267,34 @@ public interface FessConfig extends FessEnv, org.codelibs.fess.mylasta.direction
|
|
|
return getAsInteger(FessConfig.API_DASHBOARD_RESPONSE_HEADERS);
|
|
|
}
|
|
|
|
|
|
+ public String getApiCorsAllowOrigin() {
|
|
|
+ return get(FessConfig.API_CORS_ALLOW_ORIGIN);
|
|
|
+ }
|
|
|
+
|
|
|
+ public String getApiCorsAllowMethods() {
|
|
|
+ return get(FessConfig.API_CORS_ALLOW_METHODS);
|
|
|
+ }
|
|
|
+
|
|
|
+ public String getApiCorsMaxAge() {
|
|
|
+ return get(FessConfig.API_CORS_MAX_AGE);
|
|
|
+ }
|
|
|
+
|
|
|
+ public Integer getApiCorsMaxAgeAsInteger() {
|
|
|
+ return getAsInteger(FessConfig.API_CORS_MAX_AGE);
|
|
|
+ }
|
|
|
+
|
|
|
+ public String getApiCorsAllowHeaders() {
|
|
|
+ return get(FessConfig.API_CORS_ALLOW_HEADERS);
|
|
|
+ }
|
|
|
+
|
|
|
+ public String getApiCorsAllowCredentials() {
|
|
|
+ return get(FessConfig.API_CORS_ALLOW_CREDENTIALS);
|
|
|
+ }
|
|
|
+
|
|
|
+ public boolean isApiCorsAllowCredentials() {
|
|
|
+ return is(FessConfig.API_CORS_ALLOW_CREDENTIALS);
|
|
|
+ }
|
|
|
+
|
|
|
public String getVirtualHostHeaders() {
|
|
|
return get(FessConfig.VIRTUAL_HOST_HEADERS);
|
|
|
}
|
|
@@ -8491,6 +8584,11 @@ public interface FessConfig extends FessEnv, org.codelibs.fess.mylasta.direction
|
|
|
defaultMap.put(FessConfig.API_JSON_RESPONSE_HEADERS, "");
|
|
|
defaultMap.put(FessConfig.API_GSA_RESPONSE_HEADERS, "");
|
|
|
defaultMap.put(FessConfig.API_DASHBOARD_RESPONSE_HEADERS, "");
|
|
|
+ defaultMap.put(FessConfig.API_CORS_ALLOW_ORIGIN, "*");
|
|
|
+ defaultMap.put(FessConfig.API_CORS_ALLOW_METHODS, "GET, POST, OPTIONS, DELETE, PUT");
|
|
|
+ defaultMap.put(FessConfig.API_CORS_MAX_AGE, "3600");
|
|
|
+ defaultMap.put(FessConfig.API_CORS_ALLOW_HEADERS, "Origin, Content-Type, Accept, Authorization");
|
|
|
+ defaultMap.put(FessConfig.API_CORS_ALLOW_CREDENTIALS, "true");
|
|
|
defaultMap.put(FessConfig.VIRTUAL_HOST_HEADERS, "");
|
|
|
defaultMap.put(FessConfig.HTTP_PROXY_HOST, "");
|
|
|
defaultMap.put(FessConfig.HTTP_PROXY_PORT, "8080");
|