fix more issues
This commit is contained in:
parent
bd83a66052
commit
7476d647bb
|
@ -13,8 +13,7 @@ import { IoReloadCircleSharp } from 'react-icons/io5';
|
|||
import { shardOrigin } from '../store/actions/fetch';
|
||||
|
||||
async function getUrlAndId() {
|
||||
// const url = `${shardOrigin}/captcha.svg`;
|
||||
const url = '/captcha.svg';
|
||||
const url = `${shardOrigin}/captcha.svg`;
|
||||
const resp = await fetch(url, {
|
||||
cache: 'no-cache',
|
||||
});
|
||||
|
|
|
@ -53,8 +53,8 @@ function ip4NumToStr(ipNum) {
|
|||
export function getHostFromRequest(req, includeProto = true, stripSub = false) {
|
||||
const { headers } = req;
|
||||
let host = headers['x-forwarded-host']
|
||||
|| headers.host
|
||||
|| headers[':authority'];
|
||||
|| headers[':authority']
|
||||
|| headers.host;
|
||||
if (stripSub) {
|
||||
if (host.lastIndexOf('.') !== host.indexOf('.')) {
|
||||
host = host.slice(host.indexOf('.'));
|
||||
|
|
Loading…
Reference in New Issue
Block a user