Compare commits
3 Commits
| Author | SHA1 | Date | |
|---|---|---|---|
| 5cf43f8035 | |||
| df9e94ef5b | |||
| e068e8ac2a |
@ -51,3 +51,8 @@ steps:
|
|||||||
- refs/tags/*
|
- refs/tags/*
|
||||||
depends_on:
|
depends_on:
|
||||||
- dockerize
|
- dockerize
|
||||||
|
|
||||||
|
volumes:
|
||||||
|
- name: docker-socket
|
||||||
|
host:
|
||||||
|
path: /var/run/docker.sock
|
||||||
|
|||||||
@ -67,7 +67,7 @@ async fn main() {
|
|||||||
let css_hash = calculate_sha256(STATIC_CSS);
|
let css_hash = calculate_sha256(STATIC_CSS);
|
||||||
let js_hash = calculate_sha256(STATIC_JS);
|
let js_hash = calculate_sha256(STATIC_JS);
|
||||||
|
|
||||||
let css_path = format!("/style-{css_hash}.js");
|
let css_path = format!("/style-{css_hash}.css");
|
||||||
let js_path = format!("/script-{js_hash}.js");
|
let js_path = format!("/script-{js_hash}.js");
|
||||||
|
|
||||||
let state = AppState {
|
let state = AppState {
|
||||||
@ -106,7 +106,7 @@ async fn main() {
|
|||||||
|
|
||||||
async fn static_css_handler(State(state): State<AppState>) -> impl IntoResponse {
|
async fn static_css_handler(State(state): State<AppState>) -> impl IntoResponse {
|
||||||
let headers = [
|
let headers = [
|
||||||
(axum::http::header::CONTENT_TYPE, mime::CSS.as_ref()),
|
(axum::http::header::CONTENT_TYPE, mime::TEXT_CSS_UTF_8.as_ref()),
|
||||||
(axum::http::header::CACHE_CONTROL, "public, max-age=86400"),
|
(axum::http::header::CACHE_CONTROL, "public, max-age=86400"),
|
||||||
];
|
];
|
||||||
|
|
||||||
@ -117,7 +117,7 @@ async fn static_js_handler(State(state): State<AppState>) -> impl IntoResponse {
|
|||||||
let headers = [
|
let headers = [
|
||||||
(
|
(
|
||||||
axum::http::header::CONTENT_TYPE,
|
axum::http::header::CONTENT_TYPE,
|
||||||
mime::APPLICATION_JAVASCRIPT.as_ref(),
|
mime::APPLICATION_JAVASCRIPT_UTF_8.as_ref(),
|
||||||
),
|
),
|
||||||
(axum::http::header::CACHE_CONTROL, "public, max-age=86400"),
|
(axum::http::header::CACHE_CONTROL, "public, max-age=86400"),
|
||||||
];
|
];
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user