Skip to content
Snippets Groups Projects
Commit 16136c25 authored by MeiMei's avatar MeiMei Committed by syuilo
Browse files

fix self host detection (#3201)

parent 75864a51
No related branches found
No related tags found
No related merge requests found
......@@ -16,10 +16,13 @@ export default async (username: string, _host: string, option?: any, resync?: bo
return await User.findOne({ usernameLower, host: null });
}
const configHostAscii = toASCII(config.host).toLowerCase();
const configHost = toUnicode(configHostAscii);
const hostAscii = toASCII(_host).toLowerCase();
const host = toUnicode(hostAscii);
if (config.host == host) {
if (configHost == host) {
log(`return local user: ${usernameLower}`);
return await User.findOne({ usernameLower, host: null });
}
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment