set content disposition for cert (#2527)

* set content disposition for cert
* update content type for cert
* remove unnecessary frontend download attr
This commit is contained in:
Aiden McClelland
2023-11-20 11:54:05 -07:00
committed by GitHub
parent 04bd1cfa41
commit efdc558cba
7 changed files with 16 additions and 17 deletions

View File

@@ -100,7 +100,4 @@
<a
id="install-cert"
href="/eos/local.crt"
[download]="
config.isLocal() ? document.location.hostname + '.crt' : 'startos.crt'
"
></a>

View File

@@ -26,7 +26,7 @@
</ion-label>
</ion-item>
<ion-item button (click)="installCert()" [disabled]="!(crtName$ | async)">
<ion-item button (click)="installCert()">
<ion-icon slot="start" name="download-outline" size="large"></ion-icon>
<ion-label>
<h1>Download Root CA</h1>
@@ -35,5 +35,5 @@
</ion-item-group>
<!-- hidden element for downloading cert -->
<a id="install-cert" href="/eos/local.crt" [download]="crtName$ | async"></a>
<a id="install-cert" href="/eos/local.crt"></a>
</ion-content>

View File

@@ -10,10 +10,6 @@ import { DataModel } from 'src/app/services/patch-db/data-model'
changeDetection: ChangeDetectionStrategy.OnPush,
})
export class LANPage {
readonly crtName$ = this.patch
.watch$('server-info', 'lan-address')
.pipe(map(addr => `${new URL(addr).hostname}.crt`))
constructor(private readonly patch: PatchDB<DataModel>) {}
installCert(): void {