Serve akkomafe from the '/akkomafe/' subdirectory

This commit is contained in:
fruye 2023-03-21 18:20:43 +01:00
parent 0ae85abfc3
commit ab8f5420e1
3 changed files with 6 additions and 6 deletions

View File

@ -21,8 +21,8 @@ module.exports = {
env: require('./prod.env'),
index: path.resolve(__dirname, '../dist/index.html'),
assetsRoot: path.resolve(__dirname, '../dist'),
assetsSubDirectory: 'static-assets/akkomafe',
assetsPublicPath: '/',
assetsSubDirectory: '',
assetsPublicPath: '/static-assets/akkomafe/',
productionSourceMap: true,
// Gzip off by default as many popular static hosts such as
// Surge or Netlify already gzip all static assets for you.

View File

@ -404,7 +404,7 @@ const afterStoreSetup = async ({ store, i18n }) => {
getStickers({ store })
const router = createRouter({
history: createWebHistory(),
history: createWebHistory('/akkomafe/'),
routes: routes(store),
scrollBehavior: (to, _from, savedPosition) => {
if (to.matched.some(m => m.meta.dontScroll)) {

View File

@ -1,6 +1,6 @@
import { reduce } from 'lodash'
const REDIRECT_URI = `${window.location.origin}/oauth-callback`
const REDIRECT_URI = `${window.location.origin}/akkomafe/oauth-callback`
export const getOrCreateApp = ({ clientId, clientSecret, instance, commit }) => {
if (clientId && clientSecret) {
@ -70,7 +70,7 @@ const getToken = ({ clientId, clientSecret, instance, code }) => {
form.append('client_secret', clientSecret)
form.append('grant_type', 'authorization_code')
form.append('code', code)
form.append('redirect_uri', `${window.location.origin}/oauth-callback`)
form.append('redirect_uri', REDIRECT_URI)
return window.fetch(url, {
method: 'POST',
@ -86,7 +86,7 @@ export const getClientToken = ({ clientId, clientSecret, instance }) => {
form.append('client_id', clientId)
form.append('client_secret', clientSecret)
form.append('grant_type', 'client_credentials')
form.append('redirect_uri', `${window.location.origin}/oauth-callback`)
form.append('redirect_uri', REDIRECT_URI)
return window.fetch(url, {
method: 'POST',