mirror of
https://github.com/labring/FastGPT.git
synced 2025-07-23 21:13:50 +00:00
v4.6.5 (#620)
This commit is contained in:
@@ -31,3 +31,11 @@ export async function authCertOrShareId({
|
||||
canWrite: false
|
||||
};
|
||||
}
|
||||
|
||||
/* auth the request from local service */
|
||||
export const authRequestFromLocal = ({ req }: AuthModeType) => {
|
||||
const host = `${process.env.HOSTNAME || 'localhost'}:${process.env.PORT || 3000}`;
|
||||
if (host !== req.headers.host) {
|
||||
return Promise.reject('Invalid request');
|
||||
}
|
||||
};
|
||||
|
Reference in New Issue
Block a user