Skip to content

Filter by HTTP method #64

@johannespfrang

Description

@johannespfrang

It would be useful to be able to filter not only by URL, but also by HTTP request method.

My specific use case is simulating intermittent error responses which succeed a CORS pre-flight check (OPTIONS method), but are missing CORS headers on the actual POST or GET error response. For now I've simply added a

    if (`${e.method}`.toUpperCase() === "OPTIONS") {
        // keep CORS pre-flight responses intact
        log("leaving cors preflight intact")
        return {responseHeaders: e.responseHeaders};
    }

to function rewriteResponseHeader(e) locally, and loaded the add-on via about:debugging, which works just fine for this specific case.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions