Skip to content

[hotfix]BotID導入 to main#381

Open
kou135 wants to merge 5 commits intomasterfrom
hotfix/380
Open

[hotfix]BotID導入 to main#381
kou135 wants to merge 5 commits intomasterfrom
hotfix/380

Conversation

@kou135
Copy link
Contributor

@kou135 kou135 commented Feb 19, 2026

概要

AWS Marketplace掲載支援ページのお問い合わせ導線に BotID を導入し、外部フォーム直送から自前API経由へ変更しました。
Bot判定・入力検証をサーバー側で実施してから、Pardot(Account Engagement)へ転送する構成にしています。

BotIDの概要はこちらのissueを参照ください
#380

変更内容

  • botid 依存を追加
  • next.config.js を withBotId(nextConfig) でラップ
  • _app.tsx に BotIdClient を追加し、POST /api/contact/submit を保護対象に設定
  • src/pages/api/contact/submit.ts を追加
    - checkBotId() による bot 判定(bot は 403)
    - formKey / payload 検証
    - 検証通過時のみ Pardot へサーバーサイド転送
  • お問い合わせフォーム送信を API 経由へ変更(成功: thanks / 失敗: unknown-error)
  • フォームの schema/type は src/lib/contact/supportForAwsMarketplaceListing.ts に集約(フロント/APIで共通利用)

動作確認

  • 画面経由送信で thanks へ遷移すること
  • /api/contact/submit 直叩きで 403 Access denied になること(Vercel環境で確認)

画面経由
スクリーンショット 2026-02-19 21 17 30

curl直叩き
スクリーンショット 2026-02-19 21 42 10

影響範囲

  • 対象: support-for-aws-marketplace-listing のお問い合わせ送信フロー
  • 既存の他フォーム/他ページへの機能影響はなし(想定)

@vercel
Copy link

vercel bot commented Feb 19, 2026

The latest updates on your projects. Learn more about Vercel for GitHub.

Project Deployment Actions Updated (UTC)
anti-pattern-inc-github-io Error Error Feb 19, 2026 0:33am

Request Review

@@ -24,7 +24,7 @@ const MarketplaceSupport: React.FC = () => {
<Strength />
{/* https://anti-patterninc.slack.com/archives/C02FW0F3J1L/p1768438763910149 */}
{/* botがスパムメッセージを送ってしまっている。フロントからやられているのか、APIからやられているのか見分けるために、一旦コメントアウト */}
Copy link
Contributor

Choose a reason for hiding this comment

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

ここもあわせて消してほしいです!

Copy link
Contributor Author

Choose a reason for hiding this comment

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

対応しました
ad8a674

@@ -54,13 +54,13 @@ const About = () => {
</div>
{/* https://anti-patterninc.slack.com/archives/C02FW0F3J1L/p1768438763910149 */}
{/* botがスパムメッセージを送ってしまっている。フロントからやられているのか、APIからやられているのか見分けるために、一旦コメントアウト */}
Copy link
Contributor

Choose a reason for hiding this comment

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

こちらも消してほしです!

Copy link
Contributor Author

Choose a reason for hiding this comment

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

対応しました!
ad8a674

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants

Comments