Skip to content
This repository was archived by the owner on Jan 6, 2026. It is now read-only.
This repository was archived by the owner on Jan 6, 2026. It is now read-only.

Surface HTTPS retrieval success rate #137

@lidel

Description

@lidel

Looking at https://dashboard.filspark.com/ makes no distinction between http:// and https:// providers.

iiuc the current probe of HTTP retrieval is not requiring HTTPS, and both http:// and https:// providers are marked as successful if the response is valid:

spark-checker/lib/spark.js

Lines 143 to 147 in 799cc5e

const url = getRetrievalUrl(protocol, address, cid)
console.log(`Fetching: ${url}`)
resetTimeout()
const res = await this.#fetch(url, { signal })

} // Handle HTTP/HTTPs addresses using the default port
} else if (multiAddrParts[0] === 'http' || multiAddrParts[0] === 'https') {

Problem

Direct retrieval from unencrypted http:// URL is impossible in web browser contexts due to secure context limitation.
Attempting http:// request from a website loaded via https:// URL will block the request and produce mixed-context error in browser console.

Cross-origin fetch in Web API requires https:// with a valid TLS cert (signed by CA set up).
Note, these TLS certs are not used for data integrity – they are there just to facilitate Secure Context in web browsers, and they also allow use of HTTP/2 for additional performance thanks to request multiplexing.

Suggested fix

Spark seems to have all information already – maybe just log the schema used for HTTP request, and have separate success metric only for https:// URLs?

This way no additional request needs to be made, just surface how many of successes were https:// ones.

Why HTTPS matters

cc ipshipyard/roadmaps#9 @bajtos @mishmosh @hsanjuan

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type
    No fields configured for issues without a type.

    Projects

    Status

    No status

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions