Source maps
Source maps are files used in Discord’s client builds that map the bundled and minified production code back to the original source files, allowing staff and developers to debug errors using readable file names, line numbers, and original code instead of the compiled output.
Source maps cookie
The cookie for source maps is sourceMap, however the format is unknown.
This cookie is used and verified by a Cloudflare worker on all *.discord.com/assets/*.map files. If you provide an invalid cookie, the worker will throw a 404 page.
Endpoints
The base url for these endpoints is https://canary.discord.com/__development/.
Enable source maps
PUT/source_mapsEnables source maps on the client.
Response Body
| Field | Type | Description |
|---|---|---|
| sourceMapCookieTTLSeconds | integer | The source map cookie TTL in seconds |
Disable source maps
DELETE/source_mapsDisables source maps on the client.
Response Body
Returns a 204 empty body status code upon success.
With set-cookie header being equal to sourceMap=null; path=/; expires=Thu, 01 Jan 1970 00:00:00 GMT;