Function addALocation

Synopsis

#include <lib/inc/drogon/HttpAppFramework.h>

virtual HttpAppFramework & addALocation(const std::string &uriPrefix, const std::string &defaultContentType="", const std::string &alias="", bool isCaseSensitive=false, bool allowAll=true, bool isRecursive=true, const std::vector< std::string > &filters={})=0

Description

Add a location of static files for GET requests.

Parameters:

uriPrefix - The URI prefix of the location prefixed with "/"

defaultContentType - The default content type of the static files without an extension.

alias - The location in file system, if it is prefixed with "/", it presents an absolute path, otherwise it presents a relative path to the document_root path.

isCaseSensitive -

allowAll - If it is set to false, only static files with a valid extension can be accessed.

isRecursive - If it is set to false, files in sub directories can't be accessed.

filters - The list of filters which acting on the location.

Return
HttpAppFramework&

Source

Line 714 in lib/inc/drogon/HttpAppFramework.h.






Add Discussion as Guest

Log in to DocsForge