Update CORS for homepage api so localhost works

This commit is contained in:
infinite-persistence 2022-03-04 09:43:58 +08:00 committed by Thomas Zarebczan
parent 5dd457d045
commit 8772ebe0ad

View file

@ -50,6 +50,7 @@ router.get(`/$/api/content/v1/get`, async (ctx) => {
try { try {
content = getHomepageJSON(); content = getHomepageJSON();
ctx.set('Content-Type', 'application/json'); ctx.set('Content-Type', 'application/json');
ctx.set('Access-Control-Allow-Origin', '*');
ctx.body = { ctx.body = {
status: 'success', status: 'success',
data: content, data: content,