import { config } from '@opengis/fastify-table/utils.js';

const isAdmin = (req) => process.env.NODE_ENV === 'admin'
    || config.admin
    || req?.hostname?.split?.(':')?.shift?.() === config.adminDomain
    || req?.hostname?.startsWith?.('admin');

export default isAdmin;