我不確定描述是否正確,但我有以下路徑:
/feature_flags/{featureFlagName}/feature_flags/{featureFlagName}/business/{businessId}
有沒有辦法將第一個但沒有任何子路徑列入白名單:
/feature_flags/{featureFlagName}-> 只允許這個/feature_flags/{featureFlagName}/xx-> 阻止所有有額外路徑的
uj5u.com熱心網友回復:
在您的安全配置中添加路徑,僅包含以下內容:
.antMatchers("/feature_flags/*").permitAll()
.antMatchers("/feature_flags/*/**").authenticated()
或您可能需要的其他規則(hasRole、hasAuthority)。
轉載請註明出處,本文鏈接:https://www.uj5u.com/qukuanlian/525619.html
標籤:弹簧靴弹簧安全
上一篇:從DynomoDB獲取大量資料?
