Files
integration/nginx.conf
Sienna Meridian Satterwhite 14a01dd5e7 feat: initial La Gaufre v2 integration service
Multi-stage Docker image that:
- Builds lagaufre.js v2 widget from suitenumerique/integration source
  (context must be sunbeam/ root; see sunbeam build integration)
- Serves the widget, official La Suite SVG logos, custom logos for
  drive/mail/people, and a v1-compat gaufre.js wrapper via nginx

gaufre.js reveals the ui-kit GaufreButton (adds lasuite--gaufre-loaded
to <html>), loads the v2 widget, and wires button clicks via event
delegation to survive React hydration replacing the initial DOM element.

services.json is the only runtime-variable file; it is mounted from the
integration-config ConfigMap which contains the deployed service list
with DOMAIN_SUFFIX substituted at apply time.
2026-03-03 16:09:21 +00:00

40 lines
1.4 KiB
Nginx Configuration File

server {
listen 80;
server_name _;
# v2 widget — served from image, short cache OK (changes only on redeploy)
location = /api/v2/lagaufre.js {
alias /usr/share/nginx/html/widget/lagaufre.js;
add_header Content-Type "application/javascript; charset=utf-8";
add_header Access-Control-Allow-Origin "*";
add_header Cache-Control "public, max-age=3600";
}
# v2 services — mounted from ConfigMap (contains expanded DOMAIN_SUFFIX URLs)
location = /api/v2/services.json {
alias /etc/integration/services.json;
add_header Content-Type "application/json; charset=utf-8";
add_header Access-Control-Allow-Origin "*";
add_header Cache-Control "no-cache";
}
# SVG logos — served from image, long cache (change only on redeploy)
location ~ ^/logos/[a-zA-Z0-9_-]+\.svg$ {
root /usr/share/nginx/html;
add_header Content-Type "image/svg+xml";
add_header Access-Control-Allow-Origin "*";
add_header Cache-Control "public, max-age=86400";
}
# v1 gaufre.js — thin wrapper served from image (no DOMAIN_SUFFIX needed)
location = /api/v1/gaufre.js {
alias /usr/share/nginx/html/gaufre.js;
add_header Content-Type "application/javascript; charset=utf-8";
add_header Access-Control-Allow-Origin "*";
}
location / {
return 404;
}
}