ニジカ投稿局 https://tv.nizika.tv
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

index.ts 788 B

12345678910111213141516171819202122232425
  1. import express from 'express'
  2. import { CONFIG } from '@server/initializers/config.js'
  3. import { buildRateLimiter } from '@server/middlewares/index.js'
  4. import { commentFeedsRouter } from './comment-feeds.js'
  5. import { videoFeedsRouter } from './video-feeds.js'
  6. import { videoPodcastFeedsRouter } from './video-podcast-feeds.js'
  7. const feedsRouter = express.Router()
  8. const feedsRateLimiter = buildRateLimiter({
  9. windowMs: CONFIG.RATES_LIMIT.FEEDS.WINDOW_MS,
  10. max: CONFIG.RATES_LIMIT.FEEDS.MAX
  11. })
  12. feedsRouter.use('/feeds', feedsRateLimiter)
  13. feedsRouter.use('/feeds', commentFeedsRouter)
  14. feedsRouter.use('/feeds', videoFeedsRouter)
  15. feedsRouter.use('/feeds', videoPodcastFeedsRouter)
  16. // ---------------------------------------------------------------------------
  17. export {
  18. feedsRouter
  19. }