Skip to content
Snippets Groups Projects
Commit 07f0240e authored by Felix Reichenbach's avatar Felix Reichenbach
Browse files

OZG-6741 move cross origin pattern to application yaml

parent 5f505ccb
Branches
Tags
1 merge request!3OZG-6741 enable cross origin for search organisationsEinheit endpoint
...@@ -105,3 +105,5 @@ ozgcloud: ...@@ -105,3 +105,5 @@ ozgcloud:
search-template: /api/userProfiles/?searchBy={searchBy} search-template: /api/userProfiles/?searchBy={searchBy}
dms: dms:
enabled: false enabled: false
domain:
url-pattern: https://*.ozg-cloud.de
...@@ -54,7 +54,7 @@ class OrganisationsEinheitController { ...@@ -54,7 +54,7 @@ class OrganisationsEinheitController {
return ResponseEntity.of(Optional.of(service.getById(organisationsEinheitId)).map(assembler::toModel)); return ResponseEntity.of(Optional.of(service.getById(organisationsEinheitId)).map(assembler::toModel));
} }
@CrossOrigin(originPatterns = "https://*.ozg-cloud.de") @CrossOrigin(originPatterns = "${ozgcloud.domain.url-pattern}")
@GetMapping(params = { SEARCH_BY_PARAM }) @GetMapping(params = { SEARCH_BY_PARAM })
public CollectionModel<EntityModel<OrganisationsEinheitHeader>> search(@RequestParam String searchBy) { public CollectionModel<EntityModel<OrganisationsEinheitHeader>> search(@RequestParam String searchBy) {
return headerModelAssembler.toCollectionModel(service.searchOrganisationsEinheiten(searchBy).toList()); return headerModelAssembler.toCollectionModel(service.searchOrganisationsEinheiten(searchBy).toList());
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment