Skip to content
Snippets Groups Projects
Unverified Commit 64f06ec2 authored by Xiao Gui's avatar Xiao Gui
Browse files

maint: add cache to favicon

fix: do not show point assignment on a face
parent 5332c23d
No related branches found
No related tags found
No related merge requests found
......@@ -17,7 +17,7 @@ app.use('/quickstart', require('./quickstart'))
const hash = string => crypto.createHash('sha256').update(string).digest('hex')
app.use((req, _, next) => {
app.use((req, resp, next) => {
if (/main\.bundle\.js$/.test(req.originalUrl)){
const xForwardedFor = req.headers['x-forwarded-for']
const ip = req.socket.remoteAddress
......@@ -28,6 +28,9 @@ app.use((req, _, next) => {
ip: hash(ip)
})
}
if (/favicon/.test(req.originalUrl)) {
resp.setHeader(`Cache-Control`, `public, max-age=604800, immutable`)
}
next()
})
......
......@@ -6,7 +6,7 @@ import { SAPI, EXPECTED_SIIBRA_API_VERSION } from 'src/atlasComponents/sapi/sapi
import { SxplrParcellation, SxplrRegion, SxplrTemplate } from 'src/atlasComponents/sapi/sxplrTypes';
import { translateV3Entities } from 'src/atlasComponents/sapi/translateV3';
import { PathReturn } from 'src/atlasComponents/sapi/typeV3';
import { TSandsPoint } from 'src/util/types';
import { TFace, TSandsPoint } from 'src/util/types';
import { TZipFileConfig } from "src/zipFilesOutput/type"
import { environment } from "src/environments/environment"
......@@ -33,7 +33,11 @@ export class PointAssignmentComponent implements OnDestroy {
#point = new BehaviorSubject<TSandsPoint>(null)
@Input()
set point(val: TSandsPoint) {
set point(val: TSandsPoint|TFace) {
const { '@type': type } = val
if (type === "siibra-explorer/surface/face") {
return
}
this.#point.next(val)
}
......
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment