Cybersecurity-Projects/PROJECTS/beginner/canary-token-generator/backend/internal/token
CarterPerez-dev 2799045ee7 refactor(canary): consolidate realIP into middleware across 5 generators
Closes deferred Phase-9 item 8. Phase 9 promoted realIP / lastNonEmptyXFF /
OptionalHeader to internal/middleware and refactored webbug only; the
other generators kept their byte-identical local copies. Sweeping them
all over now while the touch surface is already open for Phase 10.

- docx, envfile, kubeconfig, pdf, slowredirect: drop the local
  realIP / lastNonEmptyXFF / optionalHeader functions plus the
  CF-Connecting-IP / X-Forwarded-For / X-Real-IP header constants.
  Trigger paths now call middleware.RealIP / middleware.OptionalHeader
  directly. Drops the unused "net" import from each.
- slowredirect/fingerprint_handler.go: same treatment for the
  AttachFingerprint call site.

No behavior change — middleware.RealIP is byte-identical to what was
previously inlined per generator; verified by re-running the per-package
trigger tests post-refactor.
2026-05-14 00:31:49 -04:00
..
generators refactor(canary): consolidate realIP into middleware across 5 generators 2026-05-14 00:31:49 -04:00
contract.go feat(canary): event + notify domain — contracts, senders, services 2026-05-14 00:30:42 -04:00
dto.go feat(canary): wire event + notify into runtime + create-tier rate limits 2026-05-14 00:31:24 -04:00
entity.go feat(canary): Phase 1 — Postgres schema + token & event repositories 2026-05-10 05:47:24 -04:00
handler.go feat(canary): token HTTP handlers (API + trigger routes) 2026-05-13 15:16:41 -04:00
handler_test.go feat(canary): token HTTP handlers (API + trigger routes) 2026-05-13 15:16:41 -04:00
repository.go fix(canary): clear pre-audit lint debt + migrate golangci config to v2 2026-05-12 02:49:56 -04:00
repository_test.go fix(canary-phase1): clear all post-phase-1 audit observations + header normalization 2026-05-10 06:15:26 -04:00
service.go feat(canary): token service + contract relocation 2026-05-13 15:13:43 -04:00
service_test.go feat(canary): token service + contract relocation 2026-05-13 15:13:43 -04:00
types.go feat(canary): token HTTP handlers (API + trigger routes) 2026-05-13 15:16:41 -04:00