fix: version bump 0.3.2, remove debug log, dynamic /api version, Pro plan 5000 PDFs
1. Version bump to 0.3.2
2. Remove debug console.log('CACHE HIT:') from static asset middleware
3. /api endpoint: hardcoded version → dynamic from package.json
4. OpenAPI docs + terms: Pro plan 10,000 → 5,000 PDFs/month
5. Remove .backup files
This commit is contained in:
parent
fb05989b3b
commit
37386bfb5c
8 changed files with 11 additions and 384 deletions
|
|
@ -1,8 +1,12 @@
|
|||
import express from "express";
|
||||
import { randomUUID } from "crypto";
|
||||
import { createRequire } from "module";
|
||||
import { compressionMiddleware } from "./middleware/compression.js";
|
||||
import logger from "./services/logger.js";
|
||||
import helmet from "helmet";
|
||||
|
||||
const _require = createRequire(import.meta.url);
|
||||
const APP_VERSION: string = _require("../package.json").version;
|
||||
import path from "path";
|
||||
import { fileURLToPath } from "url";
|
||||
import rateLimit from "express-rate-limit";
|
||||
|
|
@ -197,7 +201,7 @@ app.get("/docs", (_req, res) => {
|
|||
|
||||
// Static asset cache headers middleware
|
||||
app.use((req, res, next) => {
|
||||
if (/\.(css|js|png|jpg|jpeg|gif|ico|svg|woff|woff2|ttf|eot)$/.test(req.path)) { console.log("CACHE HIT:", req.path);
|
||||
if (/\.(css|js|png|jpg|jpeg|gif|ico|svg|woff|woff2|ttf|eot)$/.test(req.path)) {
|
||||
res.setHeader('Cache-Control', 'public, max-age=604800, immutable');
|
||||
}
|
||||
next();
|
||||
|
|
@ -235,7 +239,7 @@ app.get("/status", (_req, res) => {
|
|||
app.get("/api", (_req, res) => {
|
||||
res.json({
|
||||
name: "DocFast API",
|
||||
version: "0.2.9",
|
||||
version: APP_VERSION,
|
||||
endpoints: [
|
||||
"POST /v1/signup/free — Get a free API key",
|
||||
"POST /v1/convert/html",
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue