Skip to content

Commit

Permalink
Merge pull request #70 from codex-team/remove-useless-redirect-meddle…
Browse files Browse the repository at this point in the history
…ware

chore: Remove useless redirect
  • Loading branch information
e11sy authored Jul 20, 2024
2 parents fdcd15b + 6ac101a commit 45268b2
Show file tree
Hide file tree
Showing 4 changed files with 10 additions and 21 deletions.
2 changes: 1 addition & 1 deletion components/site-header-ru.vue
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@

<a
class="site-header__logo"
href="/ru"
href="/ru/"
>
<img
src="~/assets/images/hawk-logo.png"
Expand Down
6 changes: 0 additions & 6 deletions middleware/trailingSlashRedirect.js

This file was deleted.

12 changes: 0 additions & 12 deletions nuxt.config.js
Original file line number Diff line number Diff line change
@@ -1,16 +1,4 @@
export default {
router: {
/**
* This will not allow to visit route with trailing slash
* (else redirect will be treated as navigation to the current page and error will be raised)
*/
trailingSlash: false,

/**
* This middleware will redirect user if he tries to visit route with trailing slash
*/
middleware: 'trailingSlashRedirect',
},
// Target (https://go.nuxtjs.dev/config-target)
target: 'static',

Expand Down
11 changes: 9 additions & 2 deletions pages/ru.vue
Original file line number Diff line number Diff line change
Expand Up @@ -380,6 +380,13 @@ export default Vue.extend({
head() {
return {
title: "Хоук — российский трекер ошибок",
link: [
{
rel: 'canonical',
href: 'https://hawk.so/ru/',
id: 'canonical'
},
],
meta: [
{
hid: 'description',
Expand All @@ -404,7 +411,7 @@ export default Vue.extend({
{
hid: 'og:url',
name: 'og:url',
content: 'https://hawk.so/ru'
content: 'https://hawk.so/ru/'
},
{
hid: 'og:type',
Expand Down Expand Up @@ -434,7 +441,7 @@ export default Vue.extend({
{
hid: 'twitter:url',
name: 'twitter:url',
content: 'https://hawk.so/ru'
content: 'https://hawk.so/ru/'
},
],
}
Expand Down

0 comments on commit 45268b2

Please sign in to comment.