feat: Add opt-in enterprise license trial checkbox (no-changelog) (#7826)

<img width="518" alt="image"
src="https://github.com/n8n-io/n8n/assets/6179477/6422a057-de94-49dc-90fd-7381b5642902">

---------

Co-authored-by: Omar Ajoue <krynble@gmail.com>
This commit is contained in:
Alex Grozav
2023-12-19 14:58:30 +02:00
committed by GitHub
parent 464b565283
commit 5ed4d19059
6 changed files with 133 additions and 5 deletions

View File

@@ -43,12 +43,13 @@ class ResponseError extends Error {
}
}
async function request(config: {
export async function request(config: {
method: Method;
baseURL: string;
endpoint: string;
headers?: IDataObject;
data?: IDataObject;
withCredentials?: boolean;
}) {
const { method, baseURL, endpoint, headers, data } = config;
const options: AxiosRequestConfig = {
@@ -62,7 +63,7 @@ async function request(config: {
!baseURL.includes('api.n8n.io') &&
!baseURL.includes('n8n.cloud')
) {
options.withCredentials = true;
options.withCredentials = options.withCredentials ?? true;
}
if (['POST', 'PATCH', 'PUT'].includes(method)) {
options.data = data;