Skip to content

fix: Sync platform CORS from App Config; contact consumer onboarding - #148

Merged
patoperpetua merged 4 commits into
mainfrom
fix/146-contact-cors-consumer-onboarding
Sep 11, 2026
Merged

patoperpetua merged 4 commits into
mainfrom
fix/146-contact-cors-consumer-onboarding

Conversation

@patoperpetua

@patoperpetua patoperpetua commented Sep 11, 2026 •

Copy link
Copy Markdown
Contributor

Summary

  • Platform CORS is derived from App Config (exact app:email:origins hosts + profilesByHost keys) via pnpm cors:sync / scripts/sync-function-cors-from-appconfig.sh; Deploy API runs it after seed.
  • Removed hardcoded siteConfig.cors from infra/function-app.bicep so App Config stays the single source of truth (globs still apply at the function layer).
  • Documented the contact-consumer checklist + learnings; wired postkit-contact-consumer into pnpm sync:skills (skills MR: https://gitlab.com/singleton-sd/ai-plattform/skills/-/merge_requests/13).
  • Production contact 500 fixed operationally: provisioned missing mail.inkads.poc.singletonsd.com on Forward Email (provider 400 → HTTP 500).

Closes #146

Test plan

  • node --test scripts/platform-cors-origins.test.mjs
  • pnpm cors:sync / live App Config → Function App CORS matches profile hosts + localhost
  • OPTIONS /contact Origin InkAds → ACAO
  • InkAds-shaped POST /contact → 202
  • Human: merge skills MR; confirm pnpm sync:skills after mirror updates

Encode platform CORS origins in bicep so redeploys keep marketing contact
forms working, and add the dual allowlist checklist plus sync:skills wiring.

Co-authored-by: Cursor <cursoragent@cursor.com>

@greptile-apps greptile-apps Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

patoperpetua has reached the 50-credit limit for trial accounts. To continue receiving code reviews, upgrade your plan.

@coderabbitai

coderabbitai Bot commented Sep 11, 2026 •

Copy link
Copy Markdown

Warning

Review limit reached

Next included review available in 8 minutes.

Check out review usage here.

View limit details

Limit details: You’ve used all 3 included reviews currently available. Your 42 included PR review attempts over the past 7 days set your current allowance at 3 reviews per hour.

Enable usage-based reviews in Billing to review now. Otherwise, wait until the next included review is available.
You're only billed for reviews past your plan's rate limits ($0.25/file).

Learn how review limits work.

Review configuration:

⚙️ Run configuration

Configuration used: Organization UI

Review profile: CHILL

Plan: Essentials

Run ID: c2bde8fe-6a15-4565-87b0-68f912f05a85

📥 Commits

Reviewing files that changed from the base of the PR and between d3fa2de and 35326e6.

📒 Files selected for processing (12)
  • .github/workflows/deploy-api.yml
  • apps/api/src/host-profiles.spec.ts
  • docs/README.md
  • docs/integrations/inkads-marketing.md
  • docs/onboarding/contact-consumer.md
  • docs/operations/learnings-contact-cors-custom-domain.md
  • infra/README.md
  • infra/function-app.bicep
  • package.json
  • scripts/platform-cors-origins.mjs
  • scripts/platform-cors-origins.test.mjs
  • scripts/sync-function-cors-from-appconfig.sh

Comment @coderabbitai help to get the list of available commands.

@patoperpetua

Copy link
Copy Markdown
Contributor Author

Skills companion MR (source of truth is GitLab; GitHub is a read-only mirror): https://gitlab.com/singleton-sd/ai-plattform/skills/-/merge_requests/13 — skill path engineering/postkit-contact-consumer/ (AI-52).

Record dual-CORS, Forward Email domain 500s, hostname/TLS sequence, and
handoff pitfalls so future agents do not stop at live ops without a PR.

Co-authored-by: Cursor <cursoragent@cursor.com>
@patoperpetua

Copy link
Copy Markdown
Contributor Author

Added docs/operations/learnings-contact-cors-custom-domain.md (linked from docs/README.md) so the dual-CORS / contact-500 / custom-domain / agent-handoff lessons stay in-repo for the next run.

@greptile-apps greptile-apps Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

patoperpetua has reached the 50-credit limit for trial accounts. To continue receiving code reviews, upgrade your plan.

patoperpetua and others added 2 commits September 11, 2026 23:55
Derive exact CORS origins from app:email:origins (non-glob) and
profilesByHost keys via pnpm cors:sync; run on Deploy API. Drop the
hardcoded bicep list so App Config stays the single source of truth.

Co-authored-by: Cursor <cursoragent@cursor.com>
@patoperpetua

Copy link
Copy Markdown
Contributor Author

Follow-up: platform CORS is now derived from App Config (not hardcoded in bicep).

  • scripts/platform-cors-origins.mjs + pnpm cors:sync / scripts/sync-function-cors-from-appconfig.sh
  • Deploy API runs sync after seed
  • Exact origins = non-glob app:email:origins entries + every profilesByHost host (localhost* → http://, else https://)
  • Docs + learnings updated; live Function App re-synced from App Config

@greptile-apps greptile-apps Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

patoperpetua has reached the 50-credit limit for trial accounts. To continue receiving code reviews, upgrade your plan.

@patoperpetua patoperpetua changed the title fix: Persist CORS, fix contact 500, add consumer onboarding docs fix: Sync platform CORS from App Config; contact consumer onboarding Sep 11, 2026
@patoperpetua
patoperpetua merged commit a0a5dd8 into main Sep 11, 2026
2 checks passed
@patoperpetua
patoperpetua deleted the fix/146-contact-cors-consumer-onboarding branch September 11, 2026 14:05
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.

Persist Function App CORS, fix contact 500, add consumer config skill

1 participant