Skip to content

Empty Headers from Hydrator #942

Answered by alan994
tschlaepfer asked this question in Q&A
Mar 23, 2022 · 5 comments · 11 replies
Discussion options

You must be logged in to vote

Hi all,

I think we found the problem. I was sending headers all in lower case, but Ory Oath Keeper expects headers with capital letters. So I changed my hydrator endpoint from this.

app.MapPost("/hydrator", async (HttpContext httpContext, [FromBody] OryPayload payload, [FromServices] ILogger<Program> logger) =>
{
    logger.LogInformation("Payload from Ory: {@Payload}", payload);

    httpContext.Response.StatusCode = 200;

    if (payload.Header is null)
    {
        payload.Header = new Dictionary<string, object>();
    }

    payload.Header.Add("x-tl-user-id", new string[] { "alan994" });
    payload.Header.Add("x-tl-company-id", new string[] { "aj-solutions", "talentlyft" });

    lo…

Replies: 5 comments 11 replies

Comment options

You must be logged in to vote
0 replies
Comment options

You must be logged in to vote
0 replies
Comment options

You must be logged in to vote
0 replies
Comment options

You must be logged in to vote
5 replies
@vinckr
Comment options

@gen1us2k
Comment options

@alan994
Comment options

@alan994
Comment options

@gen1us2k
Comment options

Comment options

You must be logged in to vote
6 replies
@alan994
Comment options

@vinckr
Comment options

@tschlaepfer
Comment options

@aeneasr
Comment options

@vinckr
Comment options

Answer selected by vinckr
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
5 participants