webassets.hpp (99dc9c72e7dfa1c12517508ec36d0b29ca307427) | webassets.hpp (1214b7e7d921e331fb1480c7e5d579ffa5811cda) |
---|---|
1#pragma once 2 3#include <app.h> 4#include <http_request.h> 5#include <http_response.h> 6#include <routing.h> 7 8#include <boost/algorithm/string/replace.hpp> 9#include <boost/container/flat_set.hpp> | 1#pragma once 2 3#include <app.h> 4#include <http_request.h> 5#include <http_response.h> 6#include <routing.h> 7 8#include <boost/algorithm/string/replace.hpp> 9#include <boost/container/flat_set.hpp> |
10 |
|
10#include <filesystem> 11#include <fstream> 12#include <string> 13 14namespace crow 15{ 16namespace webassets 17{ --- 5 unchanged lines hidden (view full) --- 23 bool operator()(const char* a, const char* b) const 24 { 25 return std::strcmp(a, b) < 0; 26 } 27}; 28 29static boost::container::flat_set<std::string> routes; 30 | 11#include <filesystem> 12#include <fstream> 13#include <string> 14 15namespace crow 16{ 17namespace webassets 18{ --- 5 unchanged lines hidden (view full) --- 24 bool operator()(const char* a, const char* b) const 25 { 26 return std::strcmp(a, b) < 0; 27 } 28}; 29 30static boost::container::flat_set<std::string> routes; 31 |
31template <typename... Middlewares> void requestRoutes(Crow<Middlewares...>& app) | 32template <typename... Middlewares> 33void requestRoutes(Crow<Middlewares...>& app) |
32{ 33 const static boost::container::flat_map<const char*, const char*, CmpStr> 34 contentTypes{ 35 {{".css", "text/css;charset=UTF-8"}, 36 {".html", "text/html;charset=UTF-8"}, 37 {".js", "application/javascript;charset=UTF-8"}, 38 {".png", "image/png;charset=UTF-8"}, 39 {".woff", "application/x-font-woff"}, --- 123 unchanged lines hidden --- | 34{ 35 const static boost::container::flat_map<const char*, const char*, CmpStr> 36 contentTypes{ 37 {{".css", "text/css;charset=UTF-8"}, 38 {".html", "text/html;charset=UTF-8"}, 39 {".js", "application/javascript;charset=UTF-8"}, 40 {".png", "image/png;charset=UTF-8"}, 41 {".woff", "application/x-font-woff"}, --- 123 unchanged lines hidden --- |