Skip to content

Commit

Permalink
Merge pull request #810 from /issues/777
Browse files Browse the repository at this point in the history
誤植を修正しました: 「データ期待する構造」→「期待するデータ構造」
  • Loading branch information
suin authored Jan 5, 2024
2 parents ef2b5c9 + a660532 commit d99d32c
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion docs/tutorials/nextjs.md
Original file line number Diff line number Diff line change
Expand Up @@ -256,7 +256,7 @@ fetchImage().then((image) => {

:::info 厳密なレスポンスのチェック

上のコードは、サーバーサイドを100%信頼するコードになっています。クライアントサイドが期待するデータ構造を、サーバーサイドが必ず返すことを前提としたコードなのです。しかし、サーバーサイドは本当にデータ期待する構造を返してくれているでしょうか
上のコードは、サーバーサイドを100%信頼するコードになっています。クライアントサイドが期待するデータ構造を、サーバーサイドが必ず返すことを前提としたコードなのです。しかし、サーバーサイドは本当に期待するデータ構造を返してくれているでしょうか

より防衛的にするなら、クライアントサイドではサーバーのレスポンスをチェックするほうが望ましいでしょう。チェックの一例として次のような実装も考えられます。

Expand Down

1 comment on commit d99d32c

@vercel
Copy link

@vercel vercel bot commented on d99d32c Jan 5, 2024

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Please sign in to comment.