I have a project which I found ApiOriginFilter.java
under generated code, is this auto generated by swagger?
And,
There is a method doFilter
which contains response headers.
Currently, a value is set to Access-Control-Allow-Origin : *
, I want to change to Access-Control-Allow-Origin : http://example.org
As this file is auto generated, which yaml file and where should I add my change so that http://exampl.org
will appear instead of *
The swagger-codegen generates source files based on mustache templates. In the folder for the spring templates you can see the following supporting file: apiOriginFilter.mustache
you can the change Access-Control-Allow-Origin inside of the template file.
There's more details on modifying templates inside the README.md