feat: 1.5.0 prep — API v1 cutover, LICENSE, CHANGELOG, CI
- Remove legacy /api/ mount; all routes now under /api/v1/ only - Update path matchers (CSRF excludes, public routes, audit log, rate limits) - Move standalone routes (/api/network/ips, /api/docs, /api/docs/spec) to v1 - Update openapi.yaml (110 paths), CA pages, and 4 lingering frontend files - Add LICENSE (proprietary EULA), CHANGELOG.md (Keep a Changelog format) - Add .gitea/workflows/ci.yml (test+lint and security audit jobs) - Fix 9 pre-existing no-empty lint errors so CI starts green - Drop ad-hoc scratch reports and *.bak files from repo root All 739 jest tests pass. Lint is clean. Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
This commit is contained in:
@@ -16,7 +16,7 @@ DashCA now provides automatic SSL certificate generation for services on your ne
|
||||
|
||||
### 1. Generate/Download Certificate
|
||||
|
||||
**GET** `/api/ca/cert/:domain`
|
||||
**GET** `/api/v1/ca/cert/:domain`
|
||||
|
||||
Generate and download an SSL certificate for the specified domain.
|
||||
|
||||
@@ -52,7 +52,7 @@ Invoke-WebRequest -Uri "https://ca.sami/api/ca/cert/dns1.sami?format=pfx" -OutFi
|
||||
|
||||
### 2. List Generated Certificates
|
||||
|
||||
**GET** `/api/ca/certs`
|
||||
**GET** `/api/v1/ca/certs`
|
||||
|
||||
List all generated certificates with their status and expiration information.
|
||||
|
||||
|
||||
@@ -113,7 +113,7 @@ The landing page (`index.html`) includes:
|
||||
- **DashCaddy Theme:** Dark mode with Sami Grotesk font
|
||||
|
||||
**API Integration:**
|
||||
- Loads certificate info from `/api/ca/info` endpoint
|
||||
- Loads certificate info from `/api/v1/ca/info` endpoint
|
||||
- Falls back to static info if API unavailable
|
||||
|
||||
## Development Workflow
|
||||
@@ -234,7 +234,7 @@ Returns CA expiration health status:
|
||||
|
||||
**Symptom:** Certificate info stuck on loading state
|
||||
**Cause:** API endpoint not accessible
|
||||
**Solution:** Check that dashcaddy-api server is running and `/api/ca/info` responds
|
||||
**Solution:** Check that dashcaddy-api server is running and `/api/v1/ca/info` responds
|
||||
|
||||
## Testing Checklist
|
||||
|
||||
|
||||
@@ -952,7 +952,7 @@
|
||||
async function loadCertInfo() {
|
||||
try {
|
||||
// Add cache-busting parameter
|
||||
const response = await fetch('/api/ca/info?t=' + Date.now());
|
||||
const response = await fetch('/api/v1/ca/info?t=' + Date.now());
|
||||
if (!response.ok) {
|
||||
console.error('API response not OK:', response.status, response.statusText);
|
||||
throw new Error('Failed to fetch certificate info');
|
||||
@@ -1151,7 +1151,7 @@
|
||||
// Load service certificates
|
||||
async function loadServiceCertificates() {
|
||||
try {
|
||||
const response = await fetch('/api/ca/certs');
|
||||
const response = await fetch('/api/v1/ca/certs');
|
||||
if (!response.ok) {
|
||||
throw new Error('Failed to fetch certificates');
|
||||
}
|
||||
@@ -1205,17 +1205,17 @@
|
||||
<strong>Fingerprint:</strong><br>${cert.fingerprint}
|
||||
</div>
|
||||
<div class="cert-actions">
|
||||
<a href="/api/ca/cert/${cert.domain}?format=pfx&password=dashcaddy"
|
||||
<a href="/api/v1/ca/cert/${cert.domain}?format=pfx&password=dashcaddy"
|
||||
class="cert-btn cert-btn-primary"
|
||||
download="${cert.domain}.pfx">
|
||||
Download PFX
|
||||
</a>
|
||||
<a href="/api/ca/cert/${cert.domain}?format=pem"
|
||||
<a href="/api/v1/ca/cert/${cert.domain}?format=pem"
|
||||
class="cert-btn"
|
||||
download="${cert.domain}.pem">
|
||||
PEM
|
||||
</a>
|
||||
<a href="/api/ca/cert/${cert.domain}?format=crt"
|
||||
<a href="/api/v1/ca/cert/${cert.domain}?format=crt"
|
||||
class="cert-btn"
|
||||
download="${cert.domain}.crt">
|
||||
CRT
|
||||
|
||||
Reference in New Issue
Block a user