1
0
mirror of synced 2025-12-22 11:26:57 -05:00

Persist tab state in query params for linking (#31499)

This commit is contained in:
Evan Bonsignori
2022-10-12 04:43:31 -07:00
committed by GitHub
parent db77694065
commit d5cf8700ab
4 changed files with 95 additions and 45 deletions

View File

@@ -102,7 +102,7 @@ export function RestCodeSamples({ operation, slug }: Props) {
setSelectedLanguage(languageKey)
Cookies.set('codeSampleLanguagePreferred', languageKey, {
sameSite: 'strict',
secure: true,
secure: document.location.protocol !== 'http:',
})
}