diff --git a/gulpfile.ts b/gulpfile.ts index 9145750333..53185f5984 100644 --- a/gulpfile.ts +++ b/gulpfile.ts @@ -23,7 +23,6 @@ const uglifyes = require('uglify-es'); const locales = require('./locales'); import { fa } from './src/misc/fa'; -import config from './src/config'; const uglify = uglifyComposer(uglifyes, console); @@ -118,7 +117,6 @@ gulp.task('build:client:script', () => { const client = require('./built/client/meta.json'); return gulp.src(['./src/client/app/boot.js', './src/client/app/safe.js']) .pipe(replace('VERSION', JSON.stringify(client.version))) - .pipe(replace('API', JSON.stringify(config.api_url))) .pipe(replace('ENV', JSON.stringify(env))) .pipe(replace('LANGS', JSON.stringify(Object.keys(locales)))) .pipe(isProduction ? uglify({ diff --git a/src/client/app/boot.js b/src/client/app/boot.js index 08c3fdeaee..218d57d8ef 100644 --- a/src/client/app/boot.js +++ b/src/client/app/boot.js @@ -104,7 +104,7 @@ // グローバルにタイマーIDを代入しておく window.mkBootTimer = window.setTimeout(async () => { // Fetch meta - const res = await fetch(API + '/meta', { + const res = await fetch('/api/meta', { method: 'POST', cache: 'no-cache' });