mirror of
https://github.com/1Panel-dev/1Panel.git
synced 2024-11-10 17:13:30 +08:00
feat: 默认网站日志开启
This commit is contained in:
parent
cb90cd1a10
commit
62e806b1ba
5 changed files with 11 additions and 2 deletions
|
@ -119,6 +119,8 @@ func (w WebsiteService) CreateWebsite(create request.WebsiteCreate) error {
|
|||
WebsiteGroupID: create.WebsiteGroupID,
|
||||
Protocol: constant.ProtocolHTTP,
|
||||
Proxy: create.Proxy,
|
||||
AccessLog: true,
|
||||
ErrorLog: true,
|
||||
}
|
||||
|
||||
tx, ctx := getTxAndContext()
|
||||
|
@ -545,7 +547,9 @@ func (w WebsiteService) OpWebsiteHTTPS(ctx context.Context, req request.WebsiteH
|
|||
if err := deleteListenAndServerName(website, []int{443}, []string{}); err != nil {
|
||||
return response.WebsiteHTTPS{}, err
|
||||
}
|
||||
if err := deleteNginxConfig(constant.NginxScopeServer, getKeysFromStaticFile(dto.SSL), &website); err != nil {
|
||||
keys := getKeysFromStaticFile(dto.SSL)
|
||||
keys = append(keys, "if")
|
||||
if err := deleteNginxConfig(constant.NginxScopeServer, keys, &website); err != nil {
|
||||
return response.WebsiteHTTPS{}, err
|
||||
}
|
||||
if err := websiteRepo.Save(ctx, &website); err != nil {
|
||||
|
|
|
@ -167,6 +167,7 @@ export namespace Website {
|
|||
issuerName: string;
|
||||
expireDate: string;
|
||||
startDate: string;
|
||||
provider: string;
|
||||
}
|
||||
|
||||
export interface SSLCreate {
|
||||
|
|
|
@ -998,6 +998,7 @@ export default {
|
|||
key: '私钥',
|
||||
startDate: '生效时间',
|
||||
organization: '签发机构',
|
||||
renewConfirm: '是否确定续签?',
|
||||
},
|
||||
firewall: {
|
||||
ccDeny: 'CC 防护',
|
||||
|
|
|
@ -101,6 +101,9 @@ const buttons = [
|
|||
},
|
||||
{
|
||||
label: i18n.global.t('website.renewSSL'),
|
||||
disabled: function (row: Website.SSL) {
|
||||
return row.provider === 'manual';
|
||||
},
|
||||
click: function (row: Website.SSL) {
|
||||
openRenewSSL(row.id);
|
||||
},
|
||||
|
|
|
@ -8,7 +8,7 @@
|
|||
:before-close="handleClose"
|
||||
>
|
||||
<div style="text-align: center">
|
||||
<span>是否确定续签?</span>
|
||||
<span>{{ $t('ssl.renewConfirm') }}</span>
|
||||
</div>
|
||||
<template #footer>
|
||||
<span class="dialog-footer">
|
||||
|
|
Loading…
Reference in a new issue