Compare commits

..

No commits in common. "main" and "cache-control" have entirely different histories.

4 changed files with 7 additions and 9 deletions

View file

@ -1,6 +1,6 @@
{
"name": "lemmy-ui",
"version": "0.18.1-rc.5",
"version": "0.18.1-rc.4",
"description": "An isomorphic UI for lemmy",
"repository": "https://github.com/LemmyNet/lemmy-ui",
"license": "AGPL-3.0",

View file

@ -31,9 +31,8 @@ export function setCacheControl(
let caching: string;
if (
process.env.NODE_ENV === "production" &&
(req.path.match(/\.(js|css|txt|manifest\.webmanifest)\/?$/) ||
req.path.includes("/css/themelist"))
req.path.match(/\.(js|css|txt|manifest\.webmanifest)\/?$/) ||
req.path.includes("/css/themelist")
) {
// Static content gets cached publicly for a day
caching = "public, max-age=86400";

View file

@ -1,5 +1,5 @@
export default function isAuthPath(pathname: string) {
return /^\/create_.*|inbox|settings|admin|reports|registration_applications/g.test(
return /create_.*|inbox|settings|admin|reports|registration_applications/g.test(
pathname
);
}

View file

@ -14,7 +14,7 @@ const banner = `
@license magnet:?xt=urn:btih:0b31508aeb0634b347b8270c7bee4d411b5d4109&dn=agpl-3.0.txt AGPL v3.0
`;
function getBase(env, mode) {
function getBase(env) {
return {
output: {
filename: "js/server.js",
@ -54,7 +54,6 @@ function getBase(env, mode) {
plugins: [
new webpack.DefinePlugin({
"process.env.COMMIT_HASH": `"${env.COMMIT_HASH}"`,
"process.env.NODE_ENV": `"${mode}"`,
}),
new MiniCssExtractPlugin({
filename: "styles/styles.css",
@ -70,7 +69,7 @@ function getBase(env, mode) {
}
const createServerConfig = (env, mode) => {
const base = getBase(env, mode);
const base = getBase(env);
const config = merge({}, base, {
mode,
entry: "./src/server/index.tsx",
@ -98,7 +97,7 @@ const createServerConfig = (env, mode) => {
};
const createClientConfig = (env, mode) => {
const base = getBase(env, mode);
const base = getBase(env);
const config = merge({}, base, {
mode,
entry: "./src/client/index.tsx",