Skip to content

Commit

Permalink
Make user agent configuration optional
Browse files Browse the repository at this point in the history
  • Loading branch information
Jong-Vincent committed Dec 19, 2023
1 parent b450ab8 commit 644b18d
Show file tree
Hide file tree
Showing 4 changed files with 10 additions and 4 deletions.
8 changes: 8 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -92,6 +92,14 @@ environment specific properties in the group_vars. See the project OpenConext-de

For details, see the [Spring Boot manual](https://docs.spring.io/spring-boot/docs/1.2.1.RELEASE/reference/htmlsingle/).

#### [Optional configuration](#optional-configuration)

The following configurations are not shown in the application.yml file but are available:

| Configuration | Description | Default value |
|:--------------------------|:-----------------------------------------------------------------------------------------------|:--------------|
| metadata_import.useragent | Set a custom (String) value for the User-Agent header used in SAML metadata retrieval requests | null |

### [MetaData Import](#metadata-import)

When you want to import existing metaData into your local mongodb you can use the following command:
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -50,7 +50,7 @@ public class ImporterService {

public ImporterService(MetaDataAutoConfiguration metaDataAutoConfiguration, Environment environment,
@Value("${product.supported_languages}") String supportedLanguages,
@Value("${metadata_import.useragent}") String autoRefreshUserAgent) {
@Value("${metadata_import.useragent:#{null}}") String autoRefreshUserAgent) {

this.metaDataAutoConfiguration = metaDataAutoConfiguration;
this.environment = environment;
Expand Down
1 change: 0 additions & 1 deletion manage-server/src/main/resources/application.yml
Original file line number Diff line number Diff line change
Expand Up @@ -102,7 +102,6 @@ gui:
content: LOCAL

metadata_import:
useragent: ""
auto_refresh:
cronSchedule: "-"

Expand Down
3 changes: 1 addition & 2 deletions manage-server/src/test/resources/test.properties
Original file line number Diff line number Diff line change
Expand Up @@ -48,5 +48,4 @@ spring.mail.host=localhost
spring.mail.port=3025
spring.data.mongodb.uri=mongodb://localhost:27017/metadata_test
spring.main.banner-mode=off
metadata_import.auto_refresh.cronSchedule=0 0 0 30 2 *
metadata_import.useragent=""
metadata_import.auto_refresh.cronSchedule=0 0 0 30 2 *

0 comments on commit 644b18d

Please sign in to comment.