Skip to content

Commit

Permalink
http status code changed to temporary-redirect
Browse files Browse the repository at this point in the history
  • Loading branch information
aparnab93 committed Mar 8, 2022
1 parent 59aaba8 commit 356886f
Showing 1 changed file with 4 additions and 4 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -118,11 +118,11 @@ public ResponseEntity<?> install(@RequestParam(value = "company_id") String comp
.getAuthorizationURL(session.getScope(), authCallback,
session.getState(), ext.isOnlineAccessMode());
sessionStorage.saveSession(session);
return ResponseEntity.status(HttpStatus.PERMANENT_REDIRECT)
return ResponseEntity.status(HttpStatus.TEMPORARY_REDIRECT)
.header(Fields.X_COMPANY_ID, companyId)
.header(HttpHeaders.LOCATION, redirectUrl)
.header(HttpHeaders.SET_COOKIE, resCookie.toString())
.cacheControl(CacheControl.noCache())
// .cacheControl(CacheControl.noCache())
.build();
} catch (Exception error) {
log.error("Exception in install call ", error);
Expand Down Expand Up @@ -203,11 +203,11 @@ public ResponseEntity<?> authorize(@RequestParam(value = "company_id") String co
.getAuth()
.apply(ExtensionContext.get());

return ResponseEntity.status(HttpStatus.PERMANENT_REDIRECT)
return ResponseEntity.status(HttpStatus.TEMPORARY_REDIRECT)
.header(Fields.X_COMPANY_ID, fdkSession.getCompany_id())
.header(HttpHeaders.LOCATION, redirectUrl)
.header(HttpHeaders.SET_COOKIE, resCookie.toString())
.cacheControl(CacheControl.noCache())
// .cacheControl(CacheControl.noCache())
.build();
} catch (Exception error) {
log.error("Exception in auth call ", error);
Expand Down

0 comments on commit 356886f

Please sign in to comment.