Skip to content

Feature Request: Could fastly_key_is_valid conditionally return true? #597

@lewiscowper

Description

@lewiscowper

I'm trying to make sure that calling soft_purge_surrogate_key() is gated behind a call to fastly_key_is_valid(), to ensure the token is valid to purge the service, but in a viceroy environment (either as a library or a test runner), this call will always return false.

I'd love to be able to pass some magic string value in the fastly-key header to allow integration tests to execute the check and return true, rather than having a code path wrapped in #[cfg(test)] that returns true and avoiding executing the actual hostcall.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions