package Ġcom . ton y . web core . config Ċ Ċ import Ġorg . springframework . boot . autoconfigure . condition . Conditional On Expression Ċ import Ġorg . springframework . boot . autoconfigure . condition . Conditional On Web Application Ċ import Ġorg . springframework . boot . context . properties . Configuration Properties Ċ import Ġorg . springframework . boot . context . properties . Constructor Binding Ċ import Ġorg . springframework . boot . context . properties . Enable Configuration Properties Ċ import Ġorg . springframework . context . annotation . Configuration Ċ import Ġorg . springframework . web . servlet . config . annotation . Cors Registry Ċ import Ġorg . springframework . web . servlet . config . annotation . Web Mvc Configurer Ċ Ċ @ Configuration Ċ @ Conditional On Web Application Ċ @ Enable Configuration Properties ( Web Cors Properties :: class ) Ċ @ Conditional On Expression ("\ ${ web . cors . enabled : false }") Ċ internal Ġclass ĠWeb Cors Config ( ĊĠĠĠ Ġprivate Ġval Ġweb Cors Properties : ĠWeb Cors Properties Ċ ) Ġ: ĠWeb Mvc Configurer Ġ{ ĊĊĠĠĠ Ġoverride Ġfun Ġadd Cors Mappings ( registry : ĠC ors Registry ) Ġ{ ĊĠĠĠĠĠĠĠ Ġregistry . add Mapping (" /** ") ĊĠĠĠĠĠĠĠĠĠĠĠ Ġ. allowed Orig ins (* web Cors Properties . allowed Orig ins ) ĊĠĠĠĠĠĠĠĠĠĠĠ Ġ. allowed Methods ("* ") ĊĠĠĠĠĠĠĠĠĠĠĠ Ġ. allowed Headers (* web Cors Properties . allowed Headers ) ĊĠĠĠĠĠĠĠĠĠĠĠ Ġ. allow Credentials ( web Cors Properties . allow Credentials ) ĊĠĠĠ Ġ} Ċ } Ċ Ċ @ Suppress (" Array In Data Class ") Ċ @ Constructor Binding Ċ @ Conditional On Web Application Ċ @ Configuration Properties ( prefix Ġ= Ġ" web . cors ") Ċ @ Conditional On Expression ("\ ${ web . cors . enabled : false }") Ċ internal Ġdata Ġclass ĠWeb Cors Properties ( ĊĠĠĠ Ġval Ġallowed Orig ins : ĠArray < String >, ĊĠĠĠ Ġval Ġallowed Headers : ĠArray < String >, ĊĠĠĠ Ġval Ġallow Credentials : ĠBoolean Ġ= Ġfalse Ċ ) Ċ