mirror of
https://github.com/koreanbots/core.git
synced 2025-12-16 14:30:22 +00:00
chore: changed some header
This commit is contained in:
parent
87500a98c6
commit
f7aa6f8ad6
@ -7,7 +7,7 @@ export default function ResponseWrapper<T = unknown>(
|
|||||||
) {
|
) {
|
||||||
if (!code) throw new Error('`code` is required.')
|
if (!code) throw new Error('`code` is required.')
|
||||||
if (!http.STATUS_CODES[code]) throw new Error('Invalid http code.')
|
if (!http.STATUS_CODES[code]) throw new Error('Invalid http code.')
|
||||||
res.setHeader('Access-Control-Allow-Origin', process.env.KOREANBOTS_URL)
|
res.setHeader('Access-Control-Allow-Origin', '*') // process.env.KOREANBOTS_URL
|
||||||
res.status(code)
|
res.status(code)
|
||||||
res.json({
|
res.json({
|
||||||
code,
|
code,
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user