File tree Expand file tree Collapse file tree 2 files changed +4
-5
lines changed
Expand file tree Collapse file tree 2 files changed +4
-5
lines changed Original file line number Diff line number Diff line change @@ -6,10 +6,9 @@ COPY . .
66
77RUN deno task build
88RUN rm -rf $DENO_DIR
9- RUN deno install --allow-import -e main.ts
10-
11- RUN timeout 2s deno run -A --cached-only main.ts || true
9+ RUN deno install
10+ RUN deno install --allow-import -e _fresh/server.js
1211
1312ENV PORT=8000
1413
15- CMD deno serve -A --port=$PORT _fresh/server.js
14+ CMD deno serve -A --cached-only -- port=$PORT _fresh/server.js
Original file line number Diff line number Diff line change @@ -86,7 +86,7 @@ const auth = define.middleware(async (ctx) => {
8686
8787const cache = define . middleware ( async ( ctx ) => {
8888 const resp = await ctx . next ( ) ;
89- if ( ! ctx . state . api . hasToken ( ) && ctx . state . cacheControl ) {
89+ if ( ctx . state . api && ! ctx . state . api . hasToken ( ) && ctx . state . cacheControl ) {
9090 resp . headers . set ( "cache-control" , ctx . state . cacheControl ) ;
9191 }
9292 return resp ;
You can’t perform that action at this time.
0 commit comments