harlan-zw / nuxt-link-checker

Find and magically fix links that may be negatively effecting your Nuxt sites SEO.
https://nuxtseo.com/link-checker
88 stars 10 forks source link

feat: bundle requests #21

Closed dargmuesli closed 10 months ago

dargmuesli commented 1 year ago

Clear and concise description of the problem

Currently, each link triggers a separate http request, I think. This easily triggers nuxt-security's rate limiting when developing pages with more than a few links on them.

Suggested solution

If possible, it would be cool if there would be a single request for all links discovered in a single run to save on some network overhead.

Alternative

Disable rate nuxt-security's rate limited for development or increase its limits.

Additional context

The network overhead argument is more of theoretical nature as far as I see as link checking is run in development or at build time only. Please correct me if the issue could indeed be practically relevant.

harlan-zw commented 1 year ago

Agreed! This module needs some work around optimizing the link checking (ideally it would batch process via nitro internal fetch's).

I plan to have this solved before the v2 stable of Nuxt SEO, as well as adding Nuxt content integration

harlan-zw commented 10 months ago

In 3.0.0-rc.3, it will batch process 50 links at a time. Also the API endpoint is at /__link-checker__/inspect now, the rate limiter should probably ignore these internal URLs.