mirror of
https://github.com/LemmyNet/lemmy-ui.git
synced 2024-12-23 11:21:26 +00:00
This commit is contained in:
parent
3c42aad2b1
commit
e467b22ae0
1 changed files with 11 additions and 10 deletions
|
@ -11,7 +11,7 @@ import process from "process";
|
||||||
import serialize from "serialize-javascript";
|
import serialize from "serialize-javascript";
|
||||||
import { App } from "../shared/components/app/app";
|
import { App } from "../shared/components/app/app";
|
||||||
import { SYMBOLS } from "../shared/components/common/symbols";
|
import { SYMBOLS } from "../shared/components/common/symbols";
|
||||||
import { httpBaseInternal, wsUriBase } from "../shared/env";
|
import { httpBaseInternal } from "../shared/env";
|
||||||
import {
|
import {
|
||||||
ILemmyConfig,
|
ILemmyConfig,
|
||||||
InitialFetchRequest,
|
InitialFetchRequest,
|
||||||
|
@ -27,15 +27,16 @@ const [hostname, port] = process.env["LEMMY_UI_HOST"]
|
||||||
const extraThemesFolder =
|
const extraThemesFolder =
|
||||||
process.env["LEMMY_UI_EXTRA_THEMES_FOLDER"] || "./extra_themes";
|
process.env["LEMMY_UI_EXTRA_THEMES_FOLDER"] || "./extra_themes";
|
||||||
|
|
||||||
if (!process.env["LEMMY_UI_DEBUG"]) {
|
// Commenting out for now, since this broke iOS / webkit browsers.
|
||||||
server.use(function (_req, res, next) {
|
// if (!process.env["LEMMY_UI_DEBUG"]) {
|
||||||
res.setHeader(
|
// server.use(function (_req, res, next) {
|
||||||
"Content-Security-Policy",
|
// res.setHeader(
|
||||||
`default-src 'none'; connect-src 'self' ${wsUriBase}; img-src * data:; script-src 'self' 'unsafe-inline' 'unsafe-eval'; style-src 'self' 'unsafe-inline'; form-action 'self'; base-uri 'self'`
|
// "Content-Security-Policy",
|
||||||
);
|
// `default-src 'none'; connect-src 'self' ${wsUriBase}; img-src * data:; script-src 'self' 'unsafe-inline' 'unsafe-eval'; style-src 'self' 'unsafe-inline'; form-action 'self'; base-uri 'self'`
|
||||||
next();
|
// );
|
||||||
});
|
// next();
|
||||||
}
|
// });
|
||||||
|
// }
|
||||||
const customHtmlHeader = process.env["LEMMY_UI_CUSTOM_HTML_HEADER"] || "";
|
const customHtmlHeader = process.env["LEMMY_UI_CUSTOM_HTML_HEADER"] || "";
|
||||||
|
|
||||||
server.use(express.json());
|
server.use(express.json());
|
||||||
|
|
Loading…
Reference in a new issue