Skip to content

Commit

Permalink
Merge branch 'master' into feature-#189
Browse files Browse the repository at this point in the history
  • Loading branch information
lcsdavid committed Aug 16, 2021
2 parents 80e4d3f + 1dffa1c commit 49b020b
Show file tree
Hide file tree
Showing 2 changed files with 30 additions and 3 deletions.
6 changes: 3 additions & 3 deletions docs/overrides/home.html
Original file line number Diff line number Diff line change
Expand Up @@ -12,9 +12,9 @@
}

.ccard{
outline-style: solid;
outline-width: .1rem;
outline-color: #00000080;
border-style: solid;
border-width: .1rem;
border-color: #00000080;
border-radius: 0.5rem;
width: 10rem;
height: 12rem;
Expand Down
27 changes: 27 additions & 0 deletions include/crow/middlewares/utf-8.h
Original file line number Diff line number Diff line change
@@ -0,0 +1,27 @@
#pragma once
#include "crow/http_request.h"
#include "crow/http_response.h"

namespace crow
{

struct UTF8
{
struct context
{
};

void before_handle(request& /*req*/, response& /*res*/, context& /*ctx*/)
{
}

void after_handle(request& /*req*/, response& res, context& ctx)
{
if (get_header_value(res.headers, "Content-Type").empty())
{
res.set_header("Content-Type", "text/plain; charset=utf-8");
}
}
};

}

0 comments on commit 49b020b

Please sign in to comment.