mirror of
https://github.com/misskey-dev/summaly.git
synced 2025-08-03 23:06:37 +09:00
v3.0.3
This commit is contained in:
@ -28,8 +28,8 @@ export async function scpaping(url, opts) {
|
||||
},
|
||||
typeFilter: /^(text\/html|application\/xhtml\+xml)/,
|
||||
});
|
||||
// テスト用
|
||||
const allowPrivateIp = process.env.SUMMALY_ALLOW_PRIVATE_IP === 'true';
|
||||
// SUMMALY_ALLOW_PRIVATE_IPはテスト用
|
||||
const allowPrivateIp = process.env.SUMMALY_ALLOW_PRIVATE_IP === 'true' || Object.keys(agent).length > 0;
|
||||
if (!allowPrivateIp && response.ip && PrivateIp(response.ip)) {
|
||||
throw new StatusError(`Private IP rejected ${response.ip}`, 400, 'Private IP Rejected');
|
||||
}
|
||||
|
1
built/utils/status-error.d.ts
vendored
1
built/utils/status-error.d.ts
vendored
@ -1,4 +1,5 @@
|
||||
export declare class StatusError extends Error {
|
||||
name: string;
|
||||
statusCode: number;
|
||||
statusMessage?: string;
|
||||
isPermanentError: boolean;
|
||||
|
Reference in New Issue
Block a user