Compare commits

...
Author SHA1 Message Date
Artur Moreira 11cea53dab fix(frontend): auth redirects use strict false-check for auth_links (BIT-22298)
Tests / writer-pipeline tests (push) Successful in 13s
Tests / bridge tests (push) Successful in 12s
Tests / frontend lib tests (push) Successful in 12s
Tests / writer-pipeline tests (pull_request) Successful in 11s
Tests / bridge tests (pull_request) Successful in 13s
Tests / frontend lib tests (pull_request) Successful in 14s
/entrar and /registar redirected to / because !config.auth_links is
truthy when auth_links is undefined (config fallback).  Change both
pages to config.auth_links === false so only an explicit opt-out sends
the user home; missing or true both forward to wp-login.php.

Also add Cache-Control: no-store to the redirect response so edge
proxies never cache auth flows, and extend smoke-andebol.sh to assert
/entrar and /registar resolve to a wp-login URL.

Paperclip-Issue: BIT-22298
Paperclip-Agent: d706f4e6-5d05-4cec-b6e8-f8fb1f203aae
2026-05-14 13:48:27 +00:00
spark 35e8b60684 Merge pull request 'feat: add Node.js CI workflow' (#9) from feature/add-ci-workflow into main
Tests / writer-pipeline tests (push) Successful in 13s
Tests / bridge tests (push) Successful in 13s
Tests / frontend lib tests (push) Successful in 14s
Merge feature/add-ci-workflow (branch cleanup BIT-22162)
2026-05-13 22:57:30 +01:00
spark da7a01a1c1 Merge pull request 'feat(deploy): cf-cache-rules-apply.sh for BIT-21912 / BIT-21847' (#8) from feat/bit-21912-cf-cache-rules-script into main
Tests / writer-pipeline tests (push) Successful in 12s
Tests / bridge tests (push) Successful in 14s
Tests / frontend lib tests (push) Successful in 15s
2026-05-12 12:33:47 +01:00
Artur Moreira dbf2d342a7 feat: add Node.js CI workflow for bridge
Node.js CI / build-and-test (18) (pull_request) Failing after 11s
Node.js CI / build-and-test (20) (pull_request) Failing after 13s
2026-04-27 22:45:43 +00:00
4 changed files with 55 additions and 2 deletions

No files matched your search

+42
View File
@@ -0,0 +1,42 @@
# Node.js CI for news-platform bridge
# Runs on: PR and push to main/develop
# Checks: TypeScript build and type checking
name: Node.js CI
on:
push:
branches: [main, develop]
pull_request:
branches: [main, develop]
env:
CI: "true"
jobs:
build-and-test:
runs-on: ubuntu-latest
strategy:
matrix:
node-version: [18, 20]
steps:
- uses: actions/checkout@v4
- uses: actions/setup-node@v4
with:
node-version: ${{ matrix.node-version }}
cache: npm
- name: Install dependencies
run: npm ci
working-directory: bridge
- name: TypeScript build
run: npm run build
working-directory: bridge
if: always()
- name: TypeScript type checking
run: npm run typecheck
working-directory: bridge
if: always()
+9
View File
@@ -53,4 +53,13 @@ _c="$(code_for "$BASE_URL/wp-json/wp/v2/")"
[[ "$_c" == "200" ]] || fail "GET $BASE_URL/wp-json/wp/v2/ expected 200, got $_c (WP andebol :8081)"
ok "GET /wp-json/wp/v2/ → $_c"
# Auth redirects — /entrar and /registar must NOT land on / (BIT-22298)
_final_entrar="$(curl -fsS -o /dev/null -w '%{url_effective}' --max-time 25 -L -H "Host: $HOST_HEADER" "$BASE_URL/entrar" 2>/dev/null || true)"
[[ "$_final_entrar" == *"wp-login"* ]] || fail "/entrar final URL must contain wp-login; got: $_final_entrar"
ok "GET /entrar → $_final_entrar"
_final_registar="$(curl -fsS -o /dev/null -w '%{url_effective}' --max-time 25 -L -H "Host: $HOST_HEADER" "$BASE_URL/registar" 2>/dev/null || true)"
[[ "$_final_registar" == *"wp-login"* ]] || fail "/registar final URL must contain wp-login; got: $_final_registar"
ok "GET /registar → $_final_registar"
echo "All smokes passed for BASE_URL=$BASE_URL (host: $HOST_HEADER)"
+2 -1
View File
@@ -2,8 +2,9 @@
import { getDomainConfig } from '../lib/domain.js';
const config = getDomainConfig(Astro.url.hostname);
if (!config.auth_links) {
if (config.auth_links === false) {
return Astro.redirect('/', 302);
}
Astro.response.headers.set('Cache-Control', 'no-store');
return Astro.redirect('/wp-login.php', 302);
---
+2 -1
View File
@@ -2,8 +2,9 @@
import { getDomainConfig } from '../lib/domain.js';
const config = getDomainConfig(Astro.url.hostname);
if (!config.auth_links) {
if (config.auth_links === false) {
return Astro.redirect('/', 302);
}
Astro.response.headers.set('Cache-Control', 'no-store');
return Astro.redirect('/wp-login.php?action=register', 302);
---