-
Notifications
You must be signed in to change notification settings - Fork 8
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Gets the default proxy with the backend #136
Conversation
By default the app uses the default proxy provided by the web backend. However users can freely change it. The proxy is saved on the session store to avoid fetching the proxy each time.
8eb4384
to
7d3ac91
Compare
Pull Request Test Coverage Report for Build 2455558925
💛 - Coveralls |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM ! :)
|
||
const fetchFromBackend = async () => { | ||
try { | ||
const response = await fetch('/api/config/proxy'); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
const response = await fetch('/api/config/proxy'); | |
const response = await fetch(endpoints.getProxyConfig); |
import { CheckIcon, PencilIcon, RefreshIcon } from '@heroicons/react/outline'; | ||
import { FlashContext, FlashLevel, ProxyContext } from 'index'; | ||
import { ChangeEvent, FC, createRef, useContext, useEffect, useState } from 'react'; | ||
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
import * as endpoints from './Endpoints'; | |
web/frontend/src/index.tsx
Outdated
let proxy = sessionStorage.getItem('proxy'); | ||
|
||
if (proxy === null) { | ||
const response = await fetch('/api/config/proxy'); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
endpoints.getProxyConfig can also be used here :D
Kudos, SonarCloud Quality Gate passed! |
Following latest dela main and fixing local_forms.sh with new JSON format
By default the app uses the default proxy provided by the web backend. However users can freely change it. The proxy is saved on the session store to avoid fetching the proxy each time.