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

decentraland / atlas-server / 39782561064
94%

Build:
DEFAULT BRANCH: master
Ran 22 Oct 2026 12:58PM UTC
Jobs 1
Files 40
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

22 Oct 2026 12:56PM UTC coverage: 42.536% (+1.0%) from 41.554%
39782561064

push

github

web-flow
fix: always send the cors allow-origin header (#147)

## Cause
@dcl/http-server 2.x's CORS middleware only adds
`Access-Control-Allow-Origin` when the request carries `Origin`; express
`cors` in 1.5.2 always sent `*`. Responses are publicly cacheable
(`Cache-Control: public, s-maxage`), so a CDN can cache a response
without the header and break cross-origin browser fetches. The cors
config also used `method`, which the library ignores.

## Fix
- `allowAnyOriginMiddleware`
(`src/logic/allow-any-origin-middleware.ts`) sets
`Access-Control-Allow-Origin: *` on every response unless one is already
set; it is registered when `CORS_ORIGIN` is `*` or unset.
- `CORS_METHOD` is passed as `methods` (split on commas).

## Verification
- New unit spec for the middleware; `jest` 77/77, `tsc` clean.
- Against a real `@dcl/http-server` instance with this config: a request
without `Origin` now gets `Access-Control-Allow-Origin: *`; with
`Origin` and on preflight it is unchanged (`*`, preflight
`Access-Control-Allow-Methods: *`).

313 of 432 branches covered (72.45%)

Branch coverage included in aggregate %.

71 of 84 new or added lines in 2 files covered. (84.52%)

1559 of 3969 relevant lines covered (39.28%)

11.85 hits per line

Uncovered Changes

Lines Coverage ∆ File
11
0.0
0.0% src/components.ts
2
92.47
src/logic/allow-any-origin-middleware.ts
Jobs
ID Job ID Ran Files Coverage
1 39782561064.1 22 Oct 2026 12:58PM UTC 80
41.07
GitHub Action Run
Source Files on build 39782561064
  • Tree
  • List 40
  • Changed 37
  • Source Changed 1
  • Coverage Changed 37
Coverage ∆ File Lines Relevant Covered Missed Hits/Line Branch Hits Branch Misses
  • Back to Repo
  • Github Actions Build #39782561064
  • add4a0a3 on github
  • Prev Build on master (#39663188638)
  • Next Build on master (#39782910712)
  • Delete
STATUS · Troubleshooting · Open an Issue · Sales · Support · CAREERS · ENTERPRISE · START FREE TRIAL · SCHEDULE DEMO
ANNOUNCEMENTS · TWITTER · TOS & SLA · Supported CI Services · What's a CI service? · Automated Testing

© 2026 Coveralls, Inc