Function verify_secure_index

Source
pub fn verify_secure_index(path: &Path, username: &String) -> bool
Expand description

Verifies the secure index of the directory/file that’s being accessed.

§Arguments

  • path - A reference to the PathBuf object that’s being accessed.
  • username - Username of the session.

§See Also

Content delivery endpoints

  • stream - Servers the content’s landing page.
  • track - Servers the content’s subtitles track.
  • media - Servers the content as a streaming response.
  • home - Servers the content’s listing page.

Endpoints that require secure index validation

  • stream - Handles validation for both the landing page and subdirectories.
  • media - Handles validation for streaming the requested content.
  • track - Handles validation for subtitles track file.

§Returns

Returns a boolean value to indicate if the access can be granted.