Skip to content

Commit

Permalink
fix: cdn proxy (#254)
Browse files Browse the repository at this point in the history
  • Loading branch information
hmbanan666 authored Sep 2, 2024
1 parent 6d2cc34 commit 0fe32b0
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 5 deletions.
2 changes: 1 addition & 1 deletion apps/website/app/pages/(games)/addon/index.vue
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ const token = route.query.token?.toString() ?? ''
const stage = ref<HTMLElement>()
onMounted(async () => {
const addon = new BaseGameAddon({ token, websocketUrl: publicEnv.websocketUrl, cdnUrl: publicEnv.cdnUrl })
const addon = new BaseGameAddon({ token, websocketUrl: publicEnv.websocketUrl, cdnUrl: '/cdn' })
await addon.init()
stage.value?.appendChild(addon.app.canvas)
Expand Down
8 changes: 4 additions & 4 deletions apps/website/nuxt.config.ts
Original file line number Diff line number Diff line change
Expand Up @@ -20,10 +20,10 @@ export default defineNuxtConfig({
'/addon': {
ssr: false,
static: true,
headers: {
'Access-Control-Allow-Origin': '*',
'Access-Control-Allow-Methods': 'GET, POST, PUT, DELETE, PATCH, OPTIONS',
},
cors: true,
},
'/cdn/**': {
proxy: 'https://cdn.chatgame.space/**',
},
},
devtools: { enabled: true },
Expand Down

0 comments on commit 0fe32b0

Please sign in to comment.