mirror of https://github.com/halo-dev/halo
![]() #### What type of PR is this? /kind improvement /area core /milestone 2.20.x #### What this PR does / why we need it: This PR adds CorsOptions into SecurityProperties to let users customize their own CORS configuration. e.g.: ```yaml halo: security: cors-options: disabled: false configs: - pathPattern: /apis/first.api.halo.run/v1alpha1/** config: allowedOrigins: [ "*" ] allowedHeaders: [ "*" ] allowedMethods: [ "*" ] exposedHeaders: [ "*" ] allowCredentials: true maxAge: 30m - pathPattern: /apis/second.api.halo.run/v1alpha1/** config: allowedOrigins: [ "www.halo.run", "www.lxware.cn" ] allowedHeaders: [ "Content-Type", "Authorization" ] allowedMethods: [ "GET, POST, PUT, DELETE" ] allowedCredentials: false maxAge: 1h ``` #### Does this PR introduce a user-facing change? ```release-note 支持自定义跨域配置 ``` |
||
---|---|---|
.. | ||
src | ||
build.gradle |