Skip to content

Commit 29da70e

Browse files
added headers option in datasource
1 parent 81e6b49 commit 29da70e

File tree

2 files changed

+9
-3
lines changed

2 files changed

+9
-3
lines changed

client/packages/lowcoder-sdk/dataSource.d.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -329,9 +329,9 @@ export interface DataSourcePluginMeta extends DataSourcePluginBasicInfo {
329329
}
330330
| OAuthConfig
331331
);
332-
333332
sslConfig?: SSLConfig;
334-
}
333+
headers: KeyValue;
334+
},
335335
>;
336336
queryConfig: DynamicConfigObject | QueryConfig;
337337
shouldValidateDataSourceConfig: boolean;

client/packages/lowcoder/src/pages/datasource/form/pluginDataSourceForm.tsx

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -308,6 +308,12 @@ export const PluginDataSourceForm = (props: DatasourceFormProps) => {
308308
</React.Fragment>
309309
);
310310
})}
311+
<FormKeyValueItem
312+
name={"headers"}
313+
label={"Headers"}
314+
initialValue={dataSourceConfig?.headers}
315+
labelWidth={122}
316+
/>
311317
</FormSection>
312318
<FormSection $size={props.size}>
313319
<FormSectionLabel>{trans("query.authentication")}</FormSectionLabel>
@@ -317,7 +323,7 @@ export const PluginDataSourceForm = (props: DatasourceFormProps) => {
317323
options={AuthTypeOptions}
318324
initialValue={dataSourceConfig?.authConfig?.type ?? "NO_AUTH"}
319325
afterChange={(value) => setAuthType(value)}
320-
labelWidth={142}
326+
labelWidth={122}
321327
/>
322328
{showUserAuthSourceSelector()}
323329
{showAuthItem(authType)}

0 commit comments

Comments
 (0)