implement SkRateLimiterService with Leaky Bucket rate limiting
This commit is contained in:
parent
f59af78d8a
commit
ffc2737478
9 changed files with 1102 additions and 26 deletions
20
packages/backend/src/core/EnvService.ts
Normal file
20
packages/backend/src/core/EnvService.ts
Normal file
|
|
@ -0,0 +1,20 @@
|
|||
/*
|
||||
* SPDX-FileCopyrightText: hazelnoot and other Sharkey contributors
|
||||
* SPDX-License-Identifier: AGPL-3.0-only
|
||||
*/
|
||||
|
||||
import { Injectable } from '@nestjs/common';
|
||||
|
||||
/**
|
||||
* Provides access to the process environment variables.
|
||||
* This exists for testing purposes, so that a test can mock the environment without corrupting state for other tests.
|
||||
*/
|
||||
@Injectable()
|
||||
export class EnvService {
|
||||
/**
|
||||
* Passthrough to process.env
|
||||
*/
|
||||
public get env() {
|
||||
return process.env;
|
||||
}
|
||||
}
|
||||
Loading…
Add table
Add a link
Reference in a new issue