@@ -198,7 +198,7 @@ def _add_port(self, proposal):
198
198
traefik_entrypoint = Unicode (
199
199
help = """The traefik entrypoint name to use.
200
200
201
- By default, will be `web ` if http or `websecure ` if https.
201
+ By default, will be `http ` if http or `https ` if https.
202
202
203
203
If running traefik externally with your own specified entrypoint name,
204
204
set this value.
@@ -210,9 +210,19 @@ def _add_port(self, proposal):
210
210
def _default_traefik_entrypoint (self ):
211
211
"""Find the traefik entrypoint that matches our :attrib:`self.public_url`"""
212
212
if self .is_https :
213
- return "websecure "
213
+ return "https "
214
214
else :
215
- return "web"
215
+ return "http"
216
+
217
+ traefik_api_entrypoint = Unicode (
218
+ "auth_api" ,
219
+ help = """The traefik entrypoint name to use for API access.
220
+
221
+ Separate from traefik_entrypoint,
222
+ because this is usually only on localhost.
223
+ """ ,
224
+ config = True ,
225
+ )
216
226
217
227
@default ("traefik_api_password" )
218
228
def _warn_empty_password (self ):
@@ -415,7 +425,7 @@ async def _setup_traefik_static_config(self):
415
425
self .traefik_entrypoint : {
416
426
"address" : urlparse (self .public_url ).netloc ,
417
427
},
418
- "enter_api" : {
428
+ self . traefik_api_entrypoint : {
419
429
"address" : urlparse (self .traefik_api_url ).netloc ,
420
430
},
421
431
}
@@ -444,7 +454,7 @@ async def _setup_traefik_dynamic_config(self):
444
454
routers = http .setdefault ("routers" , {})
445
455
routers ["route_api" ] = {
446
456
"rule" : f"Host(`{ api_url .hostname } `) && PathPrefix(`{ api_path } `)" ,
447
- "entryPoints" : ["enter_api" ],
457
+ "entryPoints" : [self . traefik_api_entrypoint ],
448
458
"service" : "api@internal" ,
449
459
"middlewares" : ["auth_api" ],
450
460
}
0 commit comments