diff --git a/sites/scouting/index.html b/sites/scouting/index.html index 506dc47..ca733a3 100644 --- a/sites/scouting/index.html +++ b/sites/scouting/index.html @@ -5,6 +5,8 @@ Gateway Gamers — Scouting + + @@ -133,6 +135,24 @@ + + + diff --git a/sites/scouting/scouting.gateway-gamers.net.conf b/sites/scouting/scouting.gateway-gamers.net.conf index 2508679..9fae010 100644 --- a/sites/scouting/scouting.gateway-gamers.net.conf +++ b/sites/scouting/scouting.gateway-gamers.net.conf @@ -33,7 +33,10 @@ server { # blocks without it (script-src stays locked down — this only affects # CSS, and nothing here renders untrusted external content into a # style attribute). - add_header Content-Security-Policy "default-src 'self'; script-src 'self'; style-src 'self' 'unsafe-inline'; connect-src 'self' https://newprod-api.bestcoastpairings.com; img-src 'self' data:;" always; + # script-src/connect-src/frame-src additions are for "Generate Matrix": + # Google Identity Services (accounts.google.com) for the sign-in popup, + # and the Drive/Sheets REST APIs the browser calls directly afterward. + add_header Content-Security-Policy "default-src 'self'; script-src 'self' https://accounts.google.com; style-src 'self' 'unsafe-inline'; connect-src 'self' https://newprod-api.bestcoastpairings.com https://www.googleapis.com https://sheets.googleapis.com https://accounts.google.com https://oauth2.googleapis.com; frame-src https://accounts.google.com; img-src 'self' data:;" always; location /images/ { alias /var/www/domains/gateway-gamers.net/shared/images/; diff --git a/sites/scouting/src/main.js b/sites/scouting/src/main.js index 2c861bd..d9d6740 100644 --- a/sites/scouting/src/main.js +++ b/sites/scouting/src/main.js @@ -1,3 +1,5 @@ +import { generateMatrix, configureMatrixHelpers } from "./matrix.js"; + /* ---- Shared: header / footer ---- */ function loadHTML(file, elementId, callback) { fetch(file) @@ -611,6 +613,22 @@ function renderTeamList(teams, itcRanks, itcLoading, careerRecords, careerLoadin `

No teams match${q ? ` "${esc(filterText)}"` : ""}.

`; } +// Rebuilding the