ENGLISH·COURSE API
    Preparing search index...
    • Tells whether a value may be used as the course route a learner returns to after the onboarding.

      Parameters

      • value: string

        The candidate path, without the locale prefix

      Returns boolean

      true when the value is a safe course path

      The onboarding carries the route it interrupted in a next query parameter, which anyone can edit. Only locale-less course paths are accepted, so a crafted value can never redirect off the site or onto a non-course page.

      isCourseReturnPath("/courses/basics/modules/vowels"); // true
      isCourseReturnPath("//evil.example/courses/c"); // false