mirror of
https://github.com/GitbookIO/gitbook.git
synced 2026-09-12 05:48:57 +00:00
Fix OpenAPI basic auth placeholder (#3816)
This commit is contained in:
@@ -0,0 +1,5 @@
|
||||
---
|
||||
'@gitbook/react-openapi': patch
|
||||
---
|
||||
|
||||
Fix OpenAPI basic auth placeholder
|
||||
@@ -315,11 +315,12 @@ function getSecurityHeaders(args: {
|
||||
switch (security.type) {
|
||||
case 'http': {
|
||||
let scheme = security.scheme;
|
||||
const defaultPlaceholderValue = scheme?.toLowerCase()?.includes('basic')
|
||||
? 'username:password'
|
||||
: 'YOUR_SECRET_TOKEN';
|
||||
const format = resolvePrefillCodePlaceholderFromSecurityScheme({
|
||||
security: security,
|
||||
defaultPlaceholderValue: scheme?.includes('basic')
|
||||
? 'username:password'
|
||||
: 'YOUR_SECRET_TOKEN',
|
||||
defaultPlaceholderValue,
|
||||
});
|
||||
|
||||
if (scheme?.includes('bearer')) {
|
||||
|
||||
Reference in New Issue
Block a user