Skip to content

Commit

Permalink
fix(frontend): 一部の制限環境下で動作しない問題を修正 (misskey-dev#16)
Browse files Browse the repository at this point in the history
  • Loading branch information
kakkokari-gtyih authored Aug 13, 2024
1 parent e53d4bf commit be9a607
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
2 changes: 1 addition & 1 deletion packages/backend/src/server/web/boot.js
Original file line number Diff line number Diff line change
Expand Up @@ -51,7 +51,7 @@
const metaRes = await window.fetch('/api/meta', {
method: 'POST',
body: JSON.stringify({}),
credentials: 'omit',
credentials: 'same-origin',
cache: 'no-cache',
headers: {
'Content-Type': 'application/json',
Expand Down
4 changes: 2 additions & 2 deletions packages/frontend/src/scripts/misskey-api.ts
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,7 @@ export function misskeyApi<
window.fetch(`${apiUrl}/${endpoint}`, {
method: 'POST',
body: JSON.stringify(data),
credentials: 'omit',
credentials: 'same-origin',
cache: 'no-cache',
headers: {
'Content-Type': 'application/json',
Expand Down Expand Up @@ -83,7 +83,7 @@ export function misskeyApiGet<
// Send request
window.fetch(`${apiUrl}/${endpoint}?${query}`, {
method: 'GET',
credentials: 'omit',
credentials: 'same-origin',
cache: 'default',
}).then(async (res) => {
const body = res.status === 204 ? null : await res.json();
Expand Down

0 comments on commit be9a607

Please sign in to comment.