Skip to content

Commit 806fcbd

Browse files
authored
feat(server): support website history (#1210)
* feat: support website history * feat: update apisix images
1 parent e613d6f commit 806fcbd

File tree

3 files changed

+14
-9
lines changed

3 files changed

+14
-9
lines changed

deploy/build/charts/apisix/values.yaml

+4-4
Original file line numberDiff line numberDiff line change
@@ -67,10 +67,10 @@ apisix:
6767
customizedConfig: {}
6868

6969
image:
70-
repository: apache/apisix
70+
repository: docker.io/lafyun/apisix-with-plugins
7171
pullPolicy: IfNotPresent
7272
# Overrides the image tag whose default is the chart appVersion.
73-
tag: 2.15.0-alpine
73+
tag: v0.0.1
7474

7575
# Use a `DaemonSet` or `Deployment`
7676
kind: Deployment
@@ -276,8 +276,8 @@ stream_plugins:
276276
pluginAttrs: {}
277277

278278
extPlugin:
279-
enabled: false
280-
cmd: ["/path/to/apisix-plugin-runner/runner", "run"]
279+
enabled: true
280+
cmd: ["/runner/go-plugins", "run"]
281281

282282
wasmPlugins:
283283
enabled: false

server/src/gateway/apisix.service.ts

+9-4
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@ import { WebsiteHosting } from 'src/website/entities/website'
88
export class ApisixService {
99
private readonly logger = new Logger(ApisixService.name)
1010

11-
constructor(private readonly httpService: HttpService) {}
11+
constructor(private readonly httpService: HttpService) { }
1212

1313
async createAppRoute(region: Region, appid: string, domain: string) {
1414
const host = domain
@@ -133,9 +133,14 @@ export class ApisixService {
133133
read: 60,
134134
},
135135
plugins: {
136-
'proxy-rewrite': {
137-
regex_uri: ['/$', '/index.html'],
138-
},
136+
"ext-plugin-post-req": {
137+
"conf": [
138+
{
139+
"name": "try-path",
140+
"value": `{\"paths\":[\"$uri\", \"$uri/\", \"/index.html\"], \"host\": \"http://${upstreamNode}/${website.bucketName}\"}`
141+
}
142+
]
143+
}
139144
},
140145
}
141146

server/src/gateway/website-task.service.ts

+1-1
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,7 @@ export class WebsiteTaskService {
2222
private readonly regionService: RegionService,
2323
private readonly apisixService: ApisixService,
2424
private readonly certService: ApisixCustomCertService,
25-
) {}
25+
) { }
2626

2727
@Cron(CronExpression.EVERY_SECOND)
2828
async tick() {

0 commit comments

Comments
 (0)