• Home
  • Features
  • Pricing
  • Docs
  • Announcements
  • Sign In

rm-hull / dot-block / 29200214665
62%

Build:
DEFAULT BRANCH: main
Ran 12 Jul 2026 04:30PM UTC
Jobs 1
Files 37
Run time 1min
Badge
Embed ▾
README BADGES
x

If you need to use a raster PNG badge, change the '.svg' to '.png' in the link

Markdown

Textile

RDoc

HTML

Rst

12 Jul 2026 04:29PM UTC coverage: 62.134% (-0.4%) from 62.521%
29200214665

push

github

web-flow
refactor: migrate routes to tiered host-based structure (#185)

* refactor: migrate routes to tiered host-based structure

Refactored the HTTP routing layer to support distinct public and admin
interfaces based on request hostnames, while introducing a embedded SPA
serving capability.

- Moved handlers and middlewares to `internal/http` subpackages.
- Introduced `RequireHost` and `RequireProxyAuth` middlewares.
- Added support for static asset hosting via `embed.FS`.
- Separated public DNS/mobileconfig traffic from protected admin routes.

```mermaid
graph TD
    Request[Incoming Request] --> Router{Match Host?}
    Router -- Public Host --> PublicGroup[Public Endpoints]
    Router -- Admin Host --> AdminGroup[Admin Endpoints]

    PublicGroup --> DoH[DoH Handler]
    PublicGroup --> Config[MobileConfig]

    AdminGroup --> Auth[Proxy Auth]
    Auth --> API[Admin API /api/*]
    Auth --> SPA[Embedded UI]
```

* test: update integration test host and clean test file

- Updated `AllowedHosts` in integration tests to use `127.0.0.1` for
  better local test environment compatibility.
- Removed legacy ACME challenge endpoint test case from `test.http` as
  it is handled by internal TLS logic.

* refactor: improve error handling and routing logic

- Refactor `RequireBasicAuth` to return an error instead of panicking on
  invalid configuration.
- Update metrics endpoint registration to use the updated middleware
  pattern.
- Add an explicit 404 response for undefined API paths within the
  `AdminGroup` route handler.
- Clean up debug print statements in the router logic.

62 of 122 new or added lines in 7 files covered. (50.82%)

1 existing line in 1 file now uncovered.

1526 of 2456 relevant lines covered (62.13%)

713.78 hits per line

Uncovered Changes

Lines Coverage ∆ File
27
50.91
internal/http/routes/routes.go
14
12.5
internal/http/middlewares/require_proxy_auth.go
11
26.67
internal/http/middlewares/require_basic_auth.go
3
0.0
internal/http/handlers/root.go
3
75.0
internal/http/middlewares/require_host.go
1
60.95
1.7% internal/app.go
1
80.0
internal/http/web/web.go

Coverage Regressions

Lines Coverage ∆ File
1
60.95
1.7% internal/app.go
Jobs
ID Job ID Ran Files Coverage
1 29200214665.1 12 Jul 2026 04:30PM UTC 37
62.13
GitHub Action Run
Source Files on build 29200214665
  • Tree
  • List 37
  • Changed 1
  • Source Changed 0
  • Coverage Changed 1
Coverage ∆ File Lines Relevant Covered Missed Hits/Line
  • Back to Repo
  • c7572df2 on github
  • Prev Build on main (#29199625512)
  • Next Build on main (#29201367121)
  • Delete
STATUS · Troubleshooting · Open an Issue · Sales · Support · CAREERS · ENTERPRISE · START FREE · SCHEDULE DEMO
ANNOUNCEMENTS · TWITTER · TOS & SLA · Supported CI Services · What's a CI service? · Automated Testing

© 2026 Coveralls, Inc