Skip to content

Commit

Permalink
fix: add cookies to requests for calendars
Browse files Browse the repository at this point in the history
  • Loading branch information
ArtemSBulgakov committed Feb 13, 2024
1 parent 4ca2f4f commit 5eb5239
Showing 1 changed file with 11 additions and 10 deletions.
21 changes: 11 additions & 10 deletions components/common/calendar/iCalendarPlugin/event-source-def.ts
Original file line number Diff line number Diff line change
Expand Up @@ -42,17 +42,18 @@ export const eventSourceDef: EventSourceDef<ICalFeedMeta> = {
if (!internalState || arg.isRefetch) {
internalState = meta.internalState = {
response: null,
iCalExpanderPromise: fetch(meta.url, { method: "GET" }).then(
(response) => {
return response.text().then((icsText) => {
internalState.response = response;
return new IcalExpander({
ics: icsText,
skipInvalidDates: true,
});
iCalExpanderPromise: fetch(meta.url, {
method: "GET",
credentials: "include",
}).then((response) => {
return response.text().then((icsText) => {
internalState.response = response;
return new IcalExpander({
ics: icsText,
skipInvalidDates: true,
});
},
),
});
}),
};
}

Expand Down

0 comments on commit 5eb5239

Please sign in to comment.