Skip to content
This repository was archived by the owner on May 14, 2025. It is now read-only.

Commit b797aed

Browse files
committed
gh-832 Fix Triggering App Default fails with an infinite redirect
1 parent 820adbb commit b797aed

File tree

1 file changed

+4
-3
lines changed

1 file changed

+4
-3
lines changed

ui/src/app/auth/support/security-aware-request-options.ts

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
import { Injectable } from '@angular/core';
2-
import { RequestOptions, RequestOptionsArgs, Headers } from '@angular/http';
2+
import { RequestOptions, RequestOptionsArgs, Headers, RequestMethod } from '@angular/http';
33

44
/**
55
* Work-around to the fact that Angular re-instantiates
@@ -27,14 +27,15 @@ export class DefaultRequestOptions extends RequestOptions {
2727

2828
merge(options: RequestOptions) {
2929
const newRequestOptions = super.merge(options);
30-
30+
if (options.method === RequestMethod.Put) {
31+
return newRequestOptions;
32+
}
3133
if (ValueHolder.xAuthToken) {
3234
if (!newRequestOptions.headers) {
3335
newRequestOptions.headers = new Headers();
3436
}
3537
newRequestOptions.headers.append(this.xAuthTokenHeaderName, ValueHolder.xAuthToken);
3638
}
37-
3839
return new DefaultRequestOptions({
3940
method: newRequestOptions.method,
4041
headers: newRequestOptions.headers,

0 commit comments

Comments
 (0)