Hi,
As the title says I am tyring to send a custom header to my server in a redirect rule. I couldn’t find anything in the documentation, I even tried creating the redirect like so:
context.redirect = {
url: “http://localhost:8080/header-test”,
headers: {
“X-Test-Header”: “pleasepleasepleasework”
}
};
It didn’t work… so I think this post might be a feature request
Hey there @dblackhall-tyro!
I’m not sure it’s doable using rules but let me investigate it before making a feature request for you!
I just found out that we have a doc around that. Here it is:
https://auth0.com/docs/rules/guides/redirect#how-to-implement-a-redirect
Have you tried giving it a look? I’'ll relay your feedback to our product team.
I have taken a look at that doc, but I couldn’t see anything about passing headers to my redirect url.
And after further investigation I’m fairly sure this is not possible The redirect happens in the browser and I don’t think there is a way to instruct the browser to include custom headers when redirecting to my url.
I’m happy to be proven wrong though!
Sure! I’m trying to discuss it internally will get back to you with what we got otherwise I’ll open a feature request
As of now I’m sure you can use the request
library in rules to make HTTP calls so whatever that library allows you should be good. The only restriction is that not all versions of request may be available in rules.
Hey there @dblackhall-tyro!
It seems like no-one is like 100% sure about that. I’ll submit a product request for that and see how our product team reacts
2 Likes