Switch feedback reverse proxy from IIS to NGINX

- Add nginx-wp-suite.conf: static site + /api/feedback proxy to the Power
  Automate trigger (SNI on, Host header, POST-only, body cap)
- Remove IIS web.config
- Update feedback-config.js comment and DEPLOYMENT.md to the NGINX setup

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
This commit is contained in:
2026-06-15 10:46:35 -07:00
parent 7186d46196
commit 3d4402c88c
8 changed files with 83 additions and 79 deletions

View File

@@ -78,20 +78,27 @@ app.listen(8080);
Each line of `feedback.jsonl` is one submission; download it anytime. (PHP/
Python/ASP.NET equivalents are a few lines too.)
#### Option B — Internal IIS reverse proxy → Power Automate (the chosen setup)
#### Option B — Internal NGINX reverse proxy → Power Automate (the chosen setup)
The browser posts to a **same-origin** path `/api/feedback`; IIS forwards that to
the Power Automate trigger. This avoids CORS entirely and keeps the secret
The browser posts to a **same-origin** path `/api/feedback`; NGINX forwards that
to the Power Automate trigger. This avoids CORS entirely and keeps the secret
trigger URL off the client. `FEEDBACK_ENDPOINT` is already set to
`/api/feedback`, and [`web.config`](web.config) contains the proxy rule.
`/api/feedback`, and [`nginx-wp-suite.conf`](nginx-wp-suite.conf) contains the
full server block.
**On the IIS box (one-time, server admin):**
1. Install the **URL Rewrite** and **Application Request Routing (ARR)** modules.
2. Enable the proxy: IIS Manager → server node → *Application Request Routing
Cache* → *Server Proxy Settings* → check **Enable proxy**.
3. Bind the site to **HTTPS** with an internal certificate.
4. In `web.config`, replace `POWER_AUTOMATE_TRIGGER_URL` with the real trigger
URL (write every `&` as `&amp;`).
**On the NGINX box (one-time, server admin):**
1. Copy the project files to the web root (e.g. `/var/www/wp-suite`).
2. Install [`nginx-wp-suite.conf`](nginx-wp-suite.conf) (e.g. into
`/etc/nginx/conf.d/`), and set `server_name`, the `ssl_certificate` paths
(internal cert), and the `root`.
3. In the `location = /api/feedback` block, replace the `proxy_pass` URL and the
`Host` header with your real trigger URL / region host (keep the full query
string incl. `sig=`).
4. `sudo nginx -t && sudo systemctl reload nginx`.
> Two NGINX details that matter: `proxy_ssl_server_name on;` (SNI is required for
> `*.logic.azure.com` or the TLS handshake fails) and the `Host` header set to
> the Azure region host. Both are already in the provided config.
**In Power Automate:**
1. Create a flow with the **"When an HTTP request is received"** trigger.
@@ -126,7 +133,7 @@ trigger URL off the client. `FEEDBACK_ENDPOINT` is already set to
(`POWER_AUTOMATE_TRIGGER_URL`).
5. A Power App (or just the list/Excel) reads that store to show live comments.
Chain: `browser → /api/feedback (IIS proxy) → Power Automate → SharePoint/Dataverse → Power App`.
Chain: `browser → /api/feedback (NGINX proxy) → Power Automate → SharePoint/Dataverse → Power App`.
The "downloadable file" is then just the Excel/SharePoint list, viewable live or
exported — all inside your corporate cloud.