drogonframework / drogon

Drogon: A C++14/17/20 based HTTP web application framework running on Linux/macOS/Unix/Windows
MIT License
11.04k stars 1.06k forks source link

Provide capability to serve files without extension #2027

Closed TheEnigmist closed 1 month ago

TheEnigmist commented 1 month ago

I don't know if there is already a solution to this, but I need to serve files without an extension, I tried to add an empty string in file_types array in config.json but drogon gives me 403 Forbidden

I can create custom path to serve these specific files, but it would be easier if I can put them under document_root config and let drogon do all the job

an-tao commented 1 month ago

You could use the locations option in the config.json file.

TheEnigmist commented 1 month ago

I see, I forgot to put location on it, now adding it retrieve files without an extension is possible. Thanks