mirror of
https://github.com/lrnselfreliance/wrolpi.git
synced 2026-11-22 07:56:18 -05:00
Moving HTTP kiwix/help services to 9085/9086 ports. Nginx will serve HTTPS proxy for kiwix/help services at the old ports. Modifying apache2 to use HTTPS to serve map.
Using new https_proxy docker container to serve HTTPS for zim, map and help.
This commit is contained in:
parent
ae61977f0b
commit
38de2f9b40
31 changed files with 450 additions and 244 deletions
|
|
@ -147,7 +147,7 @@ function OTP() {
|
|||
|
||||
const {t} = useContext(ThemeContext);
|
||||
|
||||
let newPadURL = `http://${window.location.host}/api/otp/html`;
|
||||
let newPadURL = `https://${window.location.host}/api/otp/html`;
|
||||
let cheatSheetURL = `${process.env.PUBLIC_URL}/one-time-pad-cheat-sheet.pdf`;
|
||||
|
||||
return <>
|
||||
|
|
|
|||
|
|
@ -48,7 +48,7 @@ import _ from "lodash";
|
|||
import {killDownloads, startDownloads} from "../api";
|
||||
import Grid from "semantic-ui-react/dist/commonjs/collections/Grid";
|
||||
|
||||
export const API_URI = process.env && process.env.REACT_APP_API_URI ? process.env.REACT_APP_API_URI : `${window.location.protocol}//${window.location.host}/api`;
|
||||
export const API_URI = process.env && process.env.REACT_APP_API_URI ? process.env.REACT_APP_API_URI : `https://${window.location.host}/api`;
|
||||
export const VIDEOS_API = `${API_URI}/videos`;
|
||||
export const ARCHIVES_API = `${API_URI}/archive`;
|
||||
export const OTP_API = `${API_URI}/otp`;
|
||||
|
|
@ -56,6 +56,11 @@ export const ZIM_API = `${API_URI}/zim`;
|
|||
export const DEFAULT_LIMIT = 20;
|
||||
export const NAME = process.env && process.env.REACT_APP_NAME ? process.env.REACT_APP_NAME : null;
|
||||
|
||||
// Other services on a WROLPi.
|
||||
export const MAP_VIEWER_URI = `https://${window.location.hostname}:8084`;
|
||||
export const ZIM_VIEWER_URI = `https://${window.location.hostname}:8085`;
|
||||
export const HELP_VIEWER_URI = `https://${window.location.hostname}:8086`;
|
||||
|
||||
export function Paginator({activePage, onPageChange, totalPages, showFirstAndLast, size = 'mini'}) {
|
||||
const handlePageChange = (e, {activePage}) => {
|
||||
onPageChange(activePage);
|
||||
|
|
|
|||
|
|
@ -7,6 +7,7 @@ import {
|
|||
humanFileSize,
|
||||
IframeViewer,
|
||||
InfoMessage,
|
||||
MAP_VIEWER_URI,
|
||||
PageContainer,
|
||||
TabLinks,
|
||||
useTitle,
|
||||
|
|
@ -32,9 +33,6 @@ import {Loader, Placeholder, Table} from "./Theme";
|
|||
import {StatusContext} from "../contexts/contexts";
|
||||
import _ from "lodash";
|
||||
|
||||
|
||||
const VIEWER_URL = `http://${window.location.hostname}:8084/`;
|
||||
|
||||
function DockerMapImportWarning() {
|
||||
const {status} = useContext(StatusContext);
|
||||
if (status['dockerized']) {
|
||||
|
|
@ -95,7 +93,7 @@ function DownloadMessage() {
|
|||
|
||||
const ViewerMessage = () => {
|
||||
return <HandPointMessage>
|
||||
<p>You can view your Map at <a href={VIEWER_URL}>{VIEWER_URL}</a></p>
|
||||
<p>You can view your Map at <a href={MAP_VIEWER_URI}>{MAP_VIEWER_URI}</a></p>
|
||||
</HandPointMessage>
|
||||
}
|
||||
|
||||
|
|
@ -293,7 +291,7 @@ class ManageMap extends React.Component {
|
|||
}
|
||||
|
||||
function MapPage() {
|
||||
return <IframeViewer title='map' viewerUrl={VIEWER_URL}/>
|
||||
return <IframeViewer title='map' viewerUrl={MAP_VIEWER_URI}/>
|
||||
}
|
||||
|
||||
export function MapRoute() {
|
||||
|
|
|
|||
|
|
@ -43,7 +43,8 @@ import {
|
|||
TabLinks,
|
||||
TagIcon,
|
||||
useTitle,
|
||||
WarningMessage
|
||||
WarningMessage,
|
||||
ZIM_VIEWER_URI
|
||||
} from "./Common";
|
||||
import Grid from "semantic-ui-react/dist/commonjs/collections/Grid";
|
||||
import {TagsSelector} from "../Tags";
|
||||
|
|
@ -66,8 +67,6 @@ import {SortableTable} from "./SortableTable";
|
|||
import {toast} from "react-semantic-toasts-2";
|
||||
import _ from "lodash";
|
||||
|
||||
const VIEWER_URL = `http://${window.location.hostname}:8085/`;
|
||||
|
||||
export const OutdatedZimsMessage = ({onClick}) => {
|
||||
const [open, setOpen] = React.useState(false);
|
||||
|
||||
|
|
@ -339,7 +338,7 @@ const DownloadMessage = () => {
|
|||
|
||||
const ViewerMessage = () => {
|
||||
return <HandPointMessage>
|
||||
<p>You can view your Zim files using the Kiwix app, or at <a href={VIEWER_URL}>{VIEWER_URL}</a></p>
|
||||
<p>You can view your Zim files using the Kiwix app, or at <a href={ZIM_VIEWER_URI}>{ZIM_VIEWER_URI}</a></p>
|
||||
</HandPointMessage>
|
||||
}
|
||||
|
||||
|
|
@ -536,7 +535,7 @@ class ManageZim extends React.Component {
|
|||
}
|
||||
|
||||
function ZimViewer() {
|
||||
return <IframeViewer title='zim' viewerUrl={VIEWER_URL}/>
|
||||
return <IframeViewer title='zim' viewerUrl={ZIM_VIEWER_URI}/>
|
||||
}
|
||||
|
||||
export function ZimRoute() {
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue