Skip to content

Commit

Permalink
Change Adobe key test from Origin to Referer (#4880)
Browse files Browse the repository at this point in the history
  • Loading branch information
YohannParis authored Sep 20, 2024
1 parent 93a9363 commit 66dfb97
Showing 1 changed file with 2 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -23,8 +23,8 @@ public class AdobeController {

@GetMapping
@Secured(Roles.USER)
public ResponseEntity<String> getKey(@RequestHeader(value = "Origin", required = false) String origin) {
final String key = origin != null && origin.contains("localhost") ? adobeLocalhostKey : adobeKey;
public ResponseEntity<String> getKey(@RequestHeader(value = "Referer", required = false) String referer) {
final String key = referer != null && referer.contains("localhost") ? adobeLocalhostKey : adobeKey;
if (key == null) {
log.error("No Adobe API key is configured");
return ResponseEntity.internalServerError().build();
Expand Down

0 comments on commit 66dfb97

Please sign in to comment.