Skip to content

Commit

Permalink
first fetch with default headers, checking for existence
Browse files Browse the repository at this point in the history
Then do an additional check with JSON headers to check for tier2 auth-check
  • Loading branch information
ndelangen committed May 9, 2022
1 parent a0a8bfa commit 03e4183
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 10 deletions.
6 changes: 1 addition & 5 deletions lib/manager-webpack4/src/manager-config.ts
Original file line number Diff line number Diff line change
Expand Up @@ -42,11 +42,7 @@ export const getAutoRefs = async (
};

const checkRef = (url: string) =>
fetch(`${url}/iframe.html`, {
headers: {
Accept: 'application/json',
},
}).then(
fetch(`${url}/iframe.html`).then(
async ({ ok }) => {
if (ok) {
// so the status is ok, but if we'd ask for JSON we might get a response saying we need to authenticate.
Expand Down
6 changes: 1 addition & 5 deletions lib/manager-webpack5/src/manager-config.ts
Original file line number Diff line number Diff line change
Expand Up @@ -42,11 +42,7 @@ export const getAutoRefs = async (
};

const checkRef = (url: string) =>
fetch(`${url}/iframe.html`, {
headers: {
Accept: 'application/json',
},
}).then(
fetch(`${url}/iframe.html`).then(
async ({ ok }) => {
if (ok) {
// so the status is ok, but if we'd ask for JSON we might get a response saying we need to authenticate.
Expand Down

0 comments on commit 03e4183

Please sign in to comment.