small
This commit is contained in:
@@ -19,6 +19,11 @@ def create_app():
|
|||||||
response.headers['Cache-Control'] = f'public, max-age={max_age}'
|
response.headers['Cache-Control'] = f'public, max-age={max_age}'
|
||||||
return response
|
return response
|
||||||
|
|
||||||
|
@app.after_request
|
||||||
|
def remove_content_disposition(response):
|
||||||
|
response.headers.pop('Content-Disposition', None)
|
||||||
|
return response
|
||||||
|
|
||||||
@app.route('/')
|
@app.route('/')
|
||||||
def index():
|
def index():
|
||||||
template_vars = {
|
template_vars = {
|
||||||
|
|||||||
@@ -1,2 +1,2 @@
|
|||||||
#!/bin/sh
|
#!/bin/sh
|
||||||
exec gunicorn -w 4 -b 0.0.0.0:5000 'app:create_app()'
|
exec gunicorn -c gunicorn.conf.py --no-control-socket -w 4 -b 0.0.0.0:5000 'app:create_app()'
|
||||||
|
|||||||
10
gunicorn.conf.py
Normal file
10
gunicorn.conf.py
Normal file
@@ -0,0 +1,10 @@
|
|||||||
|
from gunicorn.http import wsgi
|
||||||
|
from functools import wraps
|
||||||
|
|
||||||
|
def wrap_default_headers(func):
|
||||||
|
@wraps(func)
|
||||||
|
def default_headers(*args, **kwargs):
|
||||||
|
return [h for h in func(*args, **kwargs) if not h.startswith('Server:')]
|
||||||
|
return default_headers
|
||||||
|
|
||||||
|
wsgi.Response.default_headers = wrap_default_headers(wsgi.Response.default_headers)
|
||||||
@@ -5,3 +5,4 @@ python-dotenv==1.0.1
|
|||||||
werkzeug==3.0.4
|
werkzeug==3.0.4
|
||||||
gunicorn
|
gunicorn
|
||||||
cssutils
|
cssutils
|
||||||
|
flask-static-digest
|
||||||
@@ -22,7 +22,7 @@
|
|||||||
.drop-zone {
|
.drop-zone {
|
||||||
cursor: pointer;
|
cursor: pointer;
|
||||||
transition: all 0.2s;
|
transition: all 0.2s;
|
||||||
min-height: 280px;
|
min-height: 200px;
|
||||||
}
|
}
|
||||||
|
|
||||||
.drop-zone:hover {
|
.drop-zone:hover {
|
||||||
|
|||||||
@@ -99,17 +99,16 @@ document.addEventListener("DOMContentLoaded", () => {
|
|||||||
<small><code>${escapeHtml(data.original ?? "")}</code> → <strong>${sizeKB}KB</strong></small>
|
<small><code>${escapeHtml(data.original ?? "")}</code> → <strong>${sizeKB}KB</strong></small>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
<div class="btn-group-vertical btn-group-sm">
|
<div class="btn-group-sm d-flex flex-column gap-2">
|
||||||
<button class="btn btn-success btn-copy-sm" type="button">
|
<button class="btn btn-success btn-copy-sm" type="button">
|
||||||
<i class="fa-solid fa-copy me-1"></i>Copy
|
<i class="fa-solid fa-copy me-1"></i>Copy
|
||||||
</button>
|
</button>
|
||||||
<a
|
<a href="data:text/html;charset=utf-8,${encodeURIComponent(rawHtml)}"
|
||||||
href="data:text/html;charset=utf-8,${encodeURIComponent(rawHtml)}"
|
download="aio.html"
|
||||||
download="aio.html"
|
class="btn btn-outline-primary btn-sm">
|
||||||
class="btn btn-outline-primary btn-sm"
|
<i class="fa-solid fa-download me-1"></i>Save
|
||||||
>
|
|
||||||
<i class="fa-solid fa-download me-1"></i>Save
|
|
||||||
</a>
|
</a>
|
||||||
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
|||||||
@@ -43,13 +43,13 @@
|
|||||||
|
|
||||||
<!-- Mode Buttons -->
|
<!-- Mode Buttons -->
|
||||||
<div class="mode-wrap mb-5">
|
<div class="mode-wrap mb-5">
|
||||||
<button class="btn btn-outline-primary btn-lg mode-btn" data-mode="basic" type="button">
|
<button class="btn btn-outline-primary btn-lg mode-btn active" data-mode="basic" type="button">
|
||||||
<i class="fa-solid fa-bolt fa-2x"></i>
|
<i class="fa-solid fa-bolt fa-2x"></i>
|
||||||
<div class="fw-semibold">Basic</div>
|
<div class="fw-semibold">Basic</div>
|
||||||
<small class="text-muted">Fast - for small sites</small>
|
<small class="text-muted">Fast - for small sites</small>
|
||||||
</button>
|
</button>
|
||||||
|
|
||||||
<button class="btn btn-outline-primary btn-lg mode-btn active" data-mode="advanced" type="button">
|
<button class="btn btn-outline-primary btn-lg mode-btn" data-mode="advanced" type="button">
|
||||||
<i class="fa-solid fa-gears fa-2x"></i>
|
<i class="fa-solid fa-gears fa-2x"></i>
|
||||||
<div class="fw-semibold">Advanced</div>
|
<div class="fw-semibold">Advanced</div>
|
||||||
<small class="text-muted">CSS chains - multiple css/js files</small>
|
<small class="text-muted">CSS chains - multiple css/js files</small>
|
||||||
@@ -57,12 +57,12 @@
|
|||||||
</div>
|
</div>
|
||||||
|
|
||||||
<!-- Drop Zone -->
|
<!-- Drop Zone -->
|
||||||
<div id="drop-zone" class="drop-zone card border border-2 border-light rounded-4 p-5 mb-4 text-center">
|
<div id="drop-zone" class="drop-zone card border border-2 border-light rounded-4 p-4 mb-4 text-center">
|
||||||
<i class="fa-solid fa-cloud-arrow-up fa-4x text-muted mb-4"></i>
|
<i class="fa-solid fa-cloud-arrow-up fa-3x text-muted mb-4"></i>
|
||||||
<h3 class="h4 fw-bold mb-3">Drop files here</h3>
|
<h3 class="h4 fw-bold mb-3">Drop files here</h3>
|
||||||
<p class="text-muted mb-4">or click to browse</p>
|
<p class="text-muted mb-4">or click <i class="fa-solid fa-arrow-down"></i></p>
|
||||||
<input type="file" id="file-input" multiple class="d-none" accept="*" />
|
<input type="file" id="file-input" multiple class="d-none" accept="*" />
|
||||||
<label for="file-input" class="btn btn-primary btn-lg px-5">
|
<label for="file-input" class="btn btn-success btn-lg px-5">
|
||||||
<i class="fa-solid fa-folder-open me-2"></i>Choose Files
|
<i class="fa-solid fa-folder-open me-2"></i>Choose Files
|
||||||
</label>
|
</label>
|
||||||
</div>
|
</div>
|
||||||
|
|||||||
Reference in New Issue
Block a user