mirror of
https://dev.azure.com/tstanciu94/ReverseProxy/_git/ReverseProxy_Frontend
synced 2025-08-05 17:22:36 +03:00
[1.4.10] Display UpstreamScheme option
This commit is contained in:
parent
4fc6d90866
commit
201fdbf7b8
2
package-lock.json
generated
2
package-lock.json
generated
@ -1,6 +1,6 @@
|
|||||||
{
|
{
|
||||||
"name": "reverse-proxy-frontend",
|
"name": "reverse-proxy-frontend",
|
||||||
"version": "1.4.9",
|
"version": "1.4.10",
|
||||||
"lockfileVersion": 1,
|
"lockfileVersion": 1,
|
||||||
"requires": true,
|
"requires": true,
|
||||||
"dependencies": {
|
"dependencies": {
|
||||||
|
@ -1,6 +1,6 @@
|
|||||||
{
|
{
|
||||||
"name": "reverse-proxy-frontend",
|
"name": "reverse-proxy-frontend",
|
||||||
"version": "1.4.9",
|
"version": "1.4.10",
|
||||||
"private": true,
|
"private": true,
|
||||||
"description": "Reverse proxy frontend application",
|
"description": "Reverse proxy frontend application",
|
||||||
"author": {
|
"author": {
|
||||||
|
@ -57,6 +57,10 @@
|
|||||||
"Label": "Trailing slash",
|
"Label": "Trailing slash",
|
||||||
"Tooltip": "A trailing slash is the forward slash placed at the end of a URL. The trailing slash is generally used to mark a directory, and if a URL is not terminated using a trailing slash, this generally points to a file."
|
"Tooltip": "A trailing slash is the forward slash placed at the end of a URL. The trailing slash is generally used to mark a directory, and if a URL is not terminated using a trailing slash, this generally points to a file."
|
||||||
},
|
},
|
||||||
|
"UpstreamScheme": {
|
||||||
|
"Label": "Upstream scheme",
|
||||||
|
"Tooltip": "UpstreamScheme option will force the reverse proxy to set on the HttpRequest the scheme found in the headers 'X-Forwarded-Scheme' or 'X-Forwarded-Proto'."
|
||||||
|
},
|
||||||
"PathOverwrite": {
|
"PathOverwrite": {
|
||||||
"Label": "Path overwrite",
|
"Label": "Path overwrite",
|
||||||
"Tooltip": "Option by which the base path of the application is automatically overwritten in all http text responses received from it."
|
"Tooltip": "Option by which the base path of the application is automatically overwritten in all http text responses received from it."
|
||||||
|
@ -48,6 +48,10 @@
|
|||||||
"Label": "Trailing slash",
|
"Label": "Trailing slash",
|
||||||
"Tooltip": "Bara oblică plasată la sfarșitul unei adrese URL. Slash-ul final este de obicei utilizat pentru a marca un director și dacă o adresă URL nu este încheiată folosind o bară oblică, aceasta indică în general un fișier."
|
"Tooltip": "Bara oblică plasată la sfarșitul unei adrese URL. Slash-ul final este de obicei utilizat pentru a marca un director și dacă o adresă URL nu este încheiată folosind o bară oblică, aceasta indică în general un fișier."
|
||||||
},
|
},
|
||||||
|
"UpstreamScheme": {
|
||||||
|
"Label": "Upstream scheme",
|
||||||
|
"Tooltip": "Opțiunea UpstreamScheme va forța proxy-ul invers să seteze pe HttpRequest schema găsită în anteturile 'X-Forwarded-Scheme' sau 'X-Forwarded-Proto'."
|
||||||
|
},
|
||||||
"PathOverwrite": {
|
"PathOverwrite": {
|
||||||
"Label": "Path overwrite",
|
"Label": "Path overwrite",
|
||||||
"Tooltip": "Opțiune prin care calea de bază a aplicației este suprascrisă automat în toate răspunsurile de text http primite de la aceasta."
|
"Tooltip": "Opțiune prin care calea de bază a aplicației este suprascrisă automat în toate răspunsurile de text http primite de la aceasta."
|
||||||
|
@ -5,6 +5,7 @@ import PathOverwriteCard from "./pathOverwrite/PathOverwriteCard";
|
|||||||
import PathInjectionCard from "./pathInjection/PathInjectionCard";
|
import PathInjectionCard from "./pathInjection/PathInjectionCard";
|
||||||
import KeyOverwriteCard from "./keyOverwrite/KeyOverwriteCard";
|
import KeyOverwriteCard from "./keyOverwrite/KeyOverwriteCard";
|
||||||
import SpecificHeadersCard from "./specificHeaders/SpecificHeadersCard";
|
import SpecificHeadersCard from "./specificHeaders/SpecificHeadersCard";
|
||||||
|
import UpstreamSchemeCard from "./upstreamScheme/UpstreamSchemeCard";
|
||||||
|
|
||||||
const ForwardOptionsAdvancedComponent = ({ options }) => {
|
const ForwardOptionsAdvancedComponent = ({ options }) => {
|
||||||
return (
|
return (
|
||||||
@ -39,6 +40,12 @@ const ForwardOptionsAdvancedComponent = ({ options }) => {
|
|||||||
<br />
|
<br />
|
||||||
</>
|
</>
|
||||||
)}
|
)}
|
||||||
|
{options.upstreamScheme && (
|
||||||
|
<>
|
||||||
|
<UpstreamSchemeCard enabled={options.upstreamScheme} />
|
||||||
|
<br />
|
||||||
|
</>
|
||||||
|
)}
|
||||||
</>
|
</>
|
||||||
);
|
);
|
||||||
};
|
};
|
||||||
|
@ -0,0 +1,26 @@
|
|||||||
|
import React from "react";
|
||||||
|
import PropTypes from "prop-types";
|
||||||
|
import ExpandableCard from "../../../../../../components/common/ExpandableCard";
|
||||||
|
import { useTranslation } from "react-i18next";
|
||||||
|
import UpstreamSchemeSummary from "./UpstreamSchemeSummary";
|
||||||
|
import FlipToFrontIcon from "@material-ui/icons/FlipToFront";
|
||||||
|
|
||||||
|
const UpstreamSchemeCard = ({ enabled }) => {
|
||||||
|
const { t } = useTranslation();
|
||||||
|
|
||||||
|
return (
|
||||||
|
<ExpandableCard
|
||||||
|
Icon={<FlipToFrontIcon />}
|
||||||
|
title={t("Forward.Options.UpstreamScheme.Label")}
|
||||||
|
subtitle={t("Forward.Options.UpstreamScheme.Tooltip")}
|
||||||
|
Summary={<UpstreamSchemeSummary enabled={enabled} />}
|
||||||
|
Content={<div>...</div>}
|
||||||
|
/>
|
||||||
|
);
|
||||||
|
};
|
||||||
|
|
||||||
|
UpstreamSchemeCard.propTypes = {
|
||||||
|
enabled: PropTypes.bool.isRequired
|
||||||
|
};
|
||||||
|
|
||||||
|
export default UpstreamSchemeCard;
|
@ -0,0 +1,24 @@
|
|||||||
|
import React from "react";
|
||||||
|
import PropTypes from "prop-types";
|
||||||
|
import { Grid } from "@material-ui/core";
|
||||||
|
import { useTranslation } from "react-i18next";
|
||||||
|
import ActiveIcon from "../../../../../../components/common/ActiveIcon";
|
||||||
|
|
||||||
|
const UpstreamSchemeSummary = ({ enabled }) => {
|
||||||
|
const { t } = useTranslation();
|
||||||
|
|
||||||
|
return (
|
||||||
|
<Grid container>
|
||||||
|
<Grid item xs={6} sm={3} md={3}>
|
||||||
|
{`${t("General.Enabled")}: `}
|
||||||
|
<ActiveIcon active={enabled} />
|
||||||
|
</Grid>
|
||||||
|
</Grid>
|
||||||
|
);
|
||||||
|
};
|
||||||
|
|
||||||
|
UpstreamSchemeSummary.propTypes = {
|
||||||
|
enabled: PropTypes.bool.isRequired
|
||||||
|
};
|
||||||
|
|
||||||
|
export default UpstreamSchemeSummary;
|
@ -53,6 +53,11 @@ const ForwardOptionsComponent = ({ title, options }) => {
|
|||||||
label: "Forward.Options.SpecificHeaders.Label",
|
label: "Forward.Options.SpecificHeaders.Label",
|
||||||
tooltip: "Forward.Options.SpecificHeaders.Tooltip",
|
tooltip: "Forward.Options.SpecificHeaders.Tooltip",
|
||||||
active: options.specificHeaders?.on
|
active: options.specificHeaders?.on
|
||||||
|
},
|
||||||
|
{
|
||||||
|
label: "Forward.Options.UpstreamScheme.Label",
|
||||||
|
tooltip: "Forward.Options.UpstreamScheme.Tooltip",
|
||||||
|
active: options.upstreamScheme
|
||||||
}
|
}
|
||||||
],
|
],
|
||||||
[options]
|
[options]
|
||||||
|
Loading…
x
Reference in New Issue
Block a user