mirror of
https://github.com/tobiasehlert/teslamateapi.git
synced 2026-02-27 09:54:18 +08:00
updating traefik configuration example
updating README
This commit is contained in:
@@ -70,13 +70,11 @@ services:
|
||||
- "traefik.http.middlewares.redirect.redirectscheme.scheme=https"
|
||||
- "traefik.http.middlewares.teslamateapi-auth.basicauth.realm=teslamateapi"
|
||||
- "traefik.http.middlewares.teslamateapi-auth.basicauth.usersfile=/auth/.htpasswd"
|
||||
- "traefik.http.middlewares.teslamateapi-prefix.stripprefix.prefixes=/api"
|
||||
- "traefik.http.routers.teslamateapi-insecure.rule=Host(`${FQDN_TM}`)"
|
||||
- "traefik.http.routers.teslamateapi-insecure.middlewares=redirect"
|
||||
- "traefik.http.routers.teslamateapi.rule=Path(`/api`) || PathPrefix(`/api/`)"
|
||||
- "traefik.http.routers.teslamateapi.entrypoints=websecure"
|
||||
- "traefik.http.routers.teslamateapi.middlewares=teslamateapi-auth"
|
||||
- "traefik.http.routers.teslamateapi.middlewares=teslamateapi-prefix"
|
||||
- "traefik.http.routers.teslamateapi.tls.certresolver=tmhttpchallenge"
|
||||
```
|
||||
|
||||
|
||||
@@ -61,6 +61,7 @@ func main() {
|
||||
v1.GET("/", func(c *gin.Context) {
|
||||
c.JSON(http.StatusOK, gin.H{"message": "TeslaMateApi v1 runnnig..", "path": "/api/v1"})
|
||||
})
|
||||
|
||||
v1.GET("/cars", TeslaMateAPICarsV1)
|
||||
v1.GET("/cars/:CarID", TeslaMateAPICarsV1)
|
||||
v1.GET("/cars/:CarID/charges", TeslaMateAPICarsChargesV1)
|
||||
|
||||
Reference in New Issue
Block a user