diff --git a/DEPLOYMENT.md b/DEPLOYMENT.md index d95c81a..a13c522 100644 --- a/DEPLOYMENT.md +++ b/DEPLOYMENT.md @@ -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 `&`). +**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. diff --git a/favicon.ico b/favicon.ico new file mode 100644 index 0000000..9c36420 Binary files /dev/null and b/favicon.ico differ diff --git a/feedback-config.js b/feedback-config.js index 4879a34..24bcbdd 100644 --- a/feedback-config.js +++ b/feedback-config.js @@ -16,11 +16,11 @@ Leave it as an empty string to stay fully local (export/import only). See DEPLOYMENT.md for setup details and sample receivers. - This is set to the same-origin path '/api/feedback', which the IIS reverse - proxy (see web.config) forwards to the Power Automate HTTP trigger. Keeping it - relative means no CORS and the secret trigger URL never appears in client - code. Locally (no proxy) the POST simply fails silently and feedback is still - saved/exported from the browser. + This is set to the same-origin path '/api/feedback', which the NGINX reverse + proxy (see nginx-wp-suite.conf) forwards to the Power Automate HTTP trigger. + Keeping it relative means no CORS and the secret trigger URL never appears in + client code. Locally (no proxy) the POST simply fails silently and feedback is + still saved/exported from the browser. ────────────────────────────────────────────────────────────────────────── */ window.FEEDBACK_ENDPOINT = '/api/feedback'; diff --git a/index.html b/index.html index 8c680fe..1ef63a8 100644 --- a/index.html +++ b/index.html @@ -4,6 +4,7 @@ Work Package Suite — Prime Controls +