elysiajs / elysia-swagger

A plugin for Elysia to auto-generate Swagger page
MIT License
84 stars 45 forks source link

Loads fonts from google #104

Closed Anulo2 closed 5 months ago

Anulo2 commented 6 months ago

Hi there, I was experimenting with elysia for the first time with this simple example:

import { Elysia, t } from "elysia";
import { cors } from '@elysiajs/cors'
import { swagger } from '@elysiajs/swagger'

const app = new Elysia().use(cors()).use(swagger()).get('/id/:id', ({ params: { id } }) => id, {
        params: t.Object({
            id: t.Numeric()
        })
    }).get("/", () => "Hello Elysia").listen(3000);

console.log(
  `🦊 Elysia is running at ${app.server?.hostname}:${app.server?.port}`
);

I visited http://localhost:3000/swagger to see what the interface looks like and I noticed a request to google is being sent to fetch some fonts. Somewhat annoyed to see this (after all, it's just a local test of the software and I find myself tracked indiscriminately), I went to search in the repo for references regarding the request without finding anything. So is it a Swagger issue and should I report it to them or is it due to the implementation done in Elysia?

marclave commented 5 months ago

hey @Anulo2 !

co-founder of scalar here 👋 please open this issue in https://github.com/scalar/scalar and we can definitely look into how we can handle fonts better and not serve google fonts!

Anulo2 commented 5 months ago

This should have been fixed: https://github.com/scalar/scalar/pull/1477