public class UrlBasedCorsConfigurationSource extends ObjectSE implements CorsConfigurationSource
CorsConfiguration
のコレクションに基づいて、リクエストごとに CorsConfiguration
インスタンスを提供します。 正確なパスマッピング URI("/admin"
など)および Ant スタイルのパスパターン("/admin/**"
など)がサポートされています。
コンストラクターと説明 |
---|
UrlBasedCorsConfigurationSource() |
修飾子と型 | メソッドと説明 |
---|---|
CorsConfiguration | getCorsConfiguration(HttpServletRequestEE request) 受信リクエストに基づいて CorsConfiguration を返します。 |
MapSE<StringSE, CorsConfiguration> | getCorsConfigurations() CORS 構成を取得します。 |
void | registerCorsConfiguration(StringSE path, CorsConfiguration config) 指定されたパスパターンの CorsConfiguration を登録します。 |
void | setAlwaysUseFullPath(boolean alwaysUseFullPath) 基になる UrlPathHelper の同じプロパティへのショートカット。 |
void | setCorsConfigurations(MapSE<StringSE, CorsConfiguration> corsConfigurations) URL パターンに基づいて CORS 構成を設定します。 |
void | setLookupPathAttributeName(StringSE lookupPathAttributeName) オプションで、lookupPath をキャッシュする属性の名前を構成します。 |
void | setPathMatcher(PathMatcher pathMatcher) 登録された URL パターンに対する URL パスのマッチングに使用する PathMatcher 実装を設定します。 |
void | setRemoveSemicolonContent(boolean removeSemicolonContent) 基になる UrlPathHelper の同じプロパティへのショートカット。 |
void | setUrlDecode(boolean urlDecode) 基になる UrlPathHelper の同じプロパティへのショートカット。 |
void | setUrlPathHelper(UrlPathHelper urlPathHelper) ルックアップパスの解決に使用する UrlPathHelper を設定します。 |
cloneSE, equalsSE, finalizeSE, getClassSE, hashCodeSE, notifySE, notifyAllSE, toStringSE, waitSE, waitSE, waitSE
public void setPathMatcher(PathMatcher pathMatcher)
AntPathMatcher
public void setAlwaysUseFullPath(boolean alwaysUseFullPath)
UrlPathHelper
の同じプロパティへのショートカット。public void setUrlDecode(boolean urlDecode)
UrlPathHelper
の同じプロパティへのショートカット。public void setLookupPathAttributeName(@Nullable StringSE lookupPathAttributeName)
UrlPathHelper.getLookupPathForRequest(HttpServletRequest, String)
を呼び出すために使用されます lookupPathAttributeName
- チェックするリクエスト属性 public void setRemoveSemicolonContent(boolean removeSemicolonContent)
UrlPathHelper
の同じプロパティへのショートカット。public void setUrlPathHelper(UrlPathHelper urlPathHelper)
これを使用して、デフォルトの UrlPathHelper をカスタムサブクラスでオーバーライドします。
public void setCorsConfigurations(@Nullable MapSE<StringSE,CorsConfiguration> corsConfigurations)
public MapSE<StringSE,CorsConfiguration> getCorsConfigurations()
public void registerCorsConfiguration(StringSE path, CorsConfiguration config)
CorsConfiguration
を登録します。@Nullable public CorsConfiguration getCorsConfiguration(HttpServletRequestEE request)
CorsConfigurationSource
CorsConfiguration
を返します。 CorsConfigurationSource
の getCorsConfiguration
CorsConfiguration
、または存在しない場合は null