Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

the improvement of the middleware #15340

Open
wants to merge 2 commits into
base: develop
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
33 changes: 22 additions & 11 deletions website/client/src/components/static/features.vue
Original file line number Diff line number Diff line change
Expand Up @@ -7,17 +7,17 @@
</div>
<div class="row">
<div class="col-md-6">
<img src="~@/assets/images/marketing/screenshot.png">
<img src="~@/assets/images/marketing/screenshot.png" class="feature-image">
<h2>{{ $t('marketing1Lead1Title') }}</h2>
<p>{{ $t('marketing1Lead1') }}</p>
</div>
<div class="col-md-6">
<img src="~@/assets/images/marketing/gear.png">
<img src="~@/assets/images/marketing/gear.png" class="feature-image">
<h2>{{ $t('marketing1Lead2Title') }}</h2>
<p>{{ $t('marketing1Lead2') }}</p>
<img
src="~@/assets/images/marketing/drops.png"
style="max-height: 200px;"
class="feature-image"
>
<h2>{{ $t('marketing1Lead3Title') }}</h2>
<p>{{ $t('marketing1Lead3') }}</p>
Expand All @@ -33,12 +33,12 @@
<div class="col-md-6">
<h2>{{ $t('marketing2Lead1Title') }}</h2>
<p>{{ $t('marketing2Lead1') }}</p>
<img src="~@/assets/images/marketing/vice3.png">
<img src="~@/assets/images/marketing/vice3.png" class="feature-image">
<h2>{{ $t('marketing2Lead2Title') }}</h2>
<p v-markdown="$t('marketing2Lead2')"></p>
</div>
<div class="col-md-6">
<img src="~@/assets/images/marketing/challenge.png">
<img src="~@/assets/images/marketing/challenge.png" class="feature-image">
<h2>{{ $t('marketing2Lead3Title') }}</h2>
<p>{{ $t('marketing2Lead3') }}</p>
</div>
Expand All @@ -51,12 +51,12 @@
</div>
<div class="row">
<div class="col-md-6">
<img src="~@/assets/images/marketing/android_iphone.png">
<img src="~@/assets/images/marketing/android_iphone.png" class="feature-image">
<h2>{{ $t('footerMobile') }}</h2>
<p v-markdown="$t('marketing3Lead1')"></p>
</div>
<div class="col-md-6">
<img src="~@/assets/images/marketing/integration.png">
<img src="~@/assets/images/marketing/integration.png" class="feature-image">
<h2>{{ $t('marketing3Lead2Title') }}</h2>
<p v-markdown="$t('marketing3Lead2')"></p>
</div>
Expand All @@ -70,7 +70,7 @@
<div class="row">
<div class="col-md-6">
<div class="media">
<img src="~@/assets/images/marketing/education.png">
<img src="~@/assets/images/marketing/education.png" class="media-image">
<div class="media-body">
<h2>{{ $t('marketing4Lead1Title') }}</h2>
<p>{{ $t('marketing4Lead1') }}</p>
Expand All @@ -79,7 +79,7 @@
</div>
<div class="col-md-6">
<div class="media">
<img src="~@/assets/images/marketing/wellness.png">
<img src="~@/assets/images/marketing/wellness.png" class="media-image">
<div class="media-body">
<h2>{{ $t('marketing4Lead2Title') }}</h2>
<p>{{ $t('marketing4Lead2') }}</p>
Expand All @@ -90,7 +90,7 @@
<div class="row">
<div class="col-md-6 offset-md-3">
<h2>{{ $t('marketing4Lead3Title') }}</h2>
<img src="~@/assets/images/marketing/lefnire.png">
<img src="~@/assets/images/marketing/lefnire.png" class="feature-image">
<p class="span">
<span>{{ $t('marketing4Lead3-1') }}</span>
<button
Expand Down Expand Up @@ -118,7 +118,7 @@
margin-left: 1em;
}

img {
.feature-image {
box-shadow: 0 0 10px 5px #888;
margin: 0.5em;
max-width: 500px;
Expand All @@ -127,6 +127,17 @@
max-width: 100%;
}
}

.media-image {
max-width: 100px;
margin-right: 1em;
}

.media {
display: flex;
align-items: center;
margin-bottom: 1em;
}
</style>

<script>
Expand Down
6 changes: 5 additions & 1 deletion website/server/middlewares/requestLogHandler.js
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,11 @@ export const logRequestData = (req, res, next) => {
data.startTime = req.requestStartTime;
logger.info('Request started', data);
req.on('close', () => {
logRequestEnd(req, res);
try {
logRequestEnd(req, res);
} catch (error) {
logger.error('Error logging request end:', error);
}
});
next();
};
Loading