Skip to content

Commit

Permalink
fixed issue where disabling crow static directory would also disable …
Browse files Browse the repository at this point in the history
…all other routes
  • Loading branch information
The-EDev committed Jul 5, 2021
1 parent 6a1623b commit 7e47d4c
Show file tree
Hide file tree
Showing 3 changed files with 6 additions and 1 deletion.
4 changes: 4 additions & 0 deletions examples/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -65,6 +65,10 @@ else ()
target_compile_options(example_chat PRIVATE "${compiler_options}")
target_link_libraries(example_chat PUBLIC ${REQUIRED_LIBRARIES})

add_executable(example_static_file example_static_file.cpp)
target_compile_options(example_static_file PRIVATE "${compiler_options}")
target_link_libraries(example_static_file PUBLIC ${REQUIRED_LIBRARIES})

add_executable(example_catchall example_catchall.cpp)
target_compile_options(example_catchall PRIVATE "${compiler_options}")
target_link_libraries(example_catchall PUBLIC ${REQUIRED_LIBRARIES})
Expand Down
1 change: 1 addition & 0 deletions examples/example_static_file.cpp
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
//#define CROW_STATIC_DRIECTORY "alternative_directory/"
//#define CROW_STATIC_ENDPOINT "/alternative_endpoint/<path>"
//#define CROW_DISABLE_STATIC_DIR
#define CROW_MAIN
#include "crow.h"

Expand Down
2 changes: 1 addition & 1 deletion include/crow/app.h
Original file line number Diff line number Diff line change
Expand Up @@ -212,8 +212,8 @@ namespace crow
res.set_static_file_info(CROW_STATIC_DIRECTORY + file_path_partial);
res.end();
});
validate();
#endif
validate();

#ifdef CROW_ENABLE_SSL
if (use_ssl_)
Expand Down

0 comments on commit 7e47d4c

Please sign in to comment.