Skip to content
This repository was archived by the owner on Sep 21, 2024. It is now read-only.

Commit

Permalink
Policy Cleanup (#48)
Browse files Browse the repository at this point in the history
* exclude API paths from caching

* remove old cache-comtrol header

* use hash strategy routing
PenguinSnail authored Dec 4, 2018
1 parent d666d85 commit f304943
Showing 5 changed files with 13 additions and 6 deletions.
2 changes: 0 additions & 2 deletions jscout/Caddyfile
Original file line number Diff line number Diff line change
@@ -34,6 +34,4 @@
# for Docker logs
log stdout
errors stdout

header / Cache-Control "public"
}
2 changes: 0 additions & 2 deletions jscout/Caddyfile_traefik → jscout/Caddyfile-traefik
Original file line number Diff line number Diff line change
@@ -27,6 +27,4 @@
# for Docker logs
log stdout
errors stdout

header / Cache-Control "public"
}
2 changes: 1 addition & 1 deletion jscout/Dockerfile-traefik
Original file line number Diff line number Diff line change
@@ -10,7 +10,7 @@ RUN npm update --save
RUN ng build --prod

FROM joshix/caddy:latest
COPY Caddyfile_traefik /var/www/html/Caddyfile
COPY Caddyfile-traefik /var/www/html/Caddyfile
COPY --from=builder /strangescout/dist/jscout /srv
EXPOSE 80 443
VOLUME /.caddy/
11 changes: 11 additions & 0 deletions jscout/ngsw-config.json
Original file line number Diff line number Diff line change
@@ -1,5 +1,16 @@
{
"index": "/index.html",
"dataGroups": [
{
"name": "api",
"urls": ["/api"],
"cacheConfig": {
"maxSize": 0,
"maxAge": "0u",
"strategy": "freshness"
}
}
],
"assetGroups": [
{
"name": "app",
2 changes: 1 addition & 1 deletion jscout/src/app/app-routing.module.ts
Original file line number Diff line number Diff line change
@@ -12,7 +12,7 @@ const routes: Routes = [
];

@NgModule({
imports: [RouterModule.forRoot(routes)],
imports: [RouterModule.forRoot(routes, { useHash: true })],
exports: [RouterModule]
})
export class AppRoutingModule { }

0 comments on commit f304943

Please sign in to comment.