Hello Support I want to get origin URL from "requ...
# support-questions-legacy
c
Hello Support I want to get origin URL from "request.session" in backend side so how to get this ?? I have review the documents but not getting any method
r
hey @Chirag parmar you mean the origin header from the request?
c
Yes
From here
IN middelware
if this is your own API, then well, you can see how toget it from your framework's request object
if this is a supertokens API you are overriding, see the link above
c
@rp_st Still not getting
I'm using like this const request1 = SuperTokens.getRequestFromUserContext(request.userContext); const customHeaderValue = request1.getHeaderValue("origin");
Getting error like this
r
this means the userCOntext doesn't have the request object
are you doing this in an API override or where?
c
No, Not override
SImple checked in authgur
r
so then why arent you just reading from your framework's request object?
c
const request = ctx.switchToHttp().getRequest();
r
sorry, i dont understand the context. Ill try helping later on if i have move time and if you can explain in more details
c
Is there any way to get from this request ?
const request = ctx.switchToHttp().getRequest();
3 Views