Revert last canary flag PR and use a better method (#5535)
* Revert "Implement Labrinth Canary API flag (#5531)"
This reverts commit 3b21944a75.
* Use Labrinth-Canary header instead of cookie for API canary
* prepr
* fix rebase
This commit is contained in:
@@ -1,9 +1,7 @@
|
||||
import {
|
||||
type AuthConfig,
|
||||
AuthFeature,
|
||||
CanaryCookieFeature,
|
||||
type FeatureConfig,
|
||||
LABRINTH_CANARY_COOKIE,
|
||||
type NuxtClientConfig,
|
||||
NuxtModrinthClient,
|
||||
} from '@modrinth/api-client'
|
||||
@@ -22,7 +20,6 @@ async function getRateLimitKeyFromSecretsStore(): Promise<string | undefined> {
|
||||
export interface ServerModrinthClientOptions {
|
||||
event?: H3Event
|
||||
authToken?: string
|
||||
canaryCookie?: boolean
|
||||
}
|
||||
|
||||
export function useServerModrinthClient(options?: ServerModrinthClientOptions): NuxtModrinthClient {
|
||||
@@ -40,10 +37,6 @@ export function useServerModrinthClient(options?: ServerModrinthClientOptions):
|
||||
)
|
||||
}
|
||||
|
||||
if (options?.canaryCookie) {
|
||||
features.push(new CanaryCookieFeature({ getCookie: () => LABRINTH_CANARY_COOKIE }))
|
||||
}
|
||||
|
||||
const clientConfig: NuxtClientConfig = {
|
||||
labrinthBaseUrl: apiBaseUrl,
|
||||
rateLimitKey: config.rateLimitKey || getRateLimitKeyFromSecretsStore,
|
||||
|
||||
Reference in New Issue
Block a user