MCPcopy Create free account
hub / github.com/adonisjs/session / setIntendedUrl

Method setIntendedUrl

src/session.ts:628–633  ·  view source on GitHub ↗

* Store a URL as the intended redirect destination. The URL is * validated using `isValidRedirectUrl` before storing. Invalid * URLs are silently ignored. * * @param url - The URL to store as the intended destination

(url: string)

Source from the content-addressed store, hash-verified

626 * @param url - The URL to store as the intended destination
627 */
628 setIntendedUrl(url: string): void {
629 if (!isValidRedirectUrl(url)) {
630 return
631 }
632 this.put('redirect.intendedUrl', url)
633 }
634
635 /**
636 * Returns the intended URL without consuming it, or `null`

Callers 3

session.spec.tsFile · 0.80

Calls 1

putMethod · 0.95

Tested by

no test coverage detected