Adding Custom domains (#247)

* WIP

* wip

* Finished doing most of the work
This commit is contained in:
Julien Nahum
2023-11-29 14:53:08 +01:00
committed by GitHub
parent 57fdfb25a0
commit b50f579155
33 changed files with 1210 additions and 267 deletions

View File

@@ -3,14 +3,14 @@ import store from '~/store'
import Meta from 'vue-meta'
import routes from './routes'
import Router from 'vue-router'
import {sync} from 'vuex-router-sync'
import { sync } from 'vuex-router-sync'
import * as Sentry from '@sentry/vue'
Vue.use(Meta)
Vue.use(Router)
// The middleware for every page of the application.
const globalMiddleware = ['locale', 'check-auth', 'notion-connection']
const globalMiddleware = ['locale', 'check-auth', 'custom-domains']
// Load middleware modules dynamically.
const requireContext = import.meta.glob('../middleware/**/*.js', { eager: true })
@@ -253,7 +253,7 @@ function resolveMiddleware (requireContext) {
.map(file =>
[file.match(/[^/]*(?=\.[^.]*$)/)[0], requireContext[file]]
).forEach(([name, middleware]) => {
middlewares[name] = middleware.default || middleware
})
middlewares[name] = middleware.default || middleware
})
return middlewares
}