Skip to content

Commit 1029a2d

Browse files
author
Joel Collins
committed
Fixed URL base to host_url
1 parent df2bc71 commit 1029a2d

File tree

1 file changed

+2
-2
lines changed
  • labthings/server/spec

1 file changed

+2
-2
lines changed

labthings/server/spec/td.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
from flask import url_for
1+
from flask import url_for, request
22
from apispec import APISpec
33

44
from ..view import View
@@ -81,7 +81,7 @@ def to_dict(self):
8181
"@context": "https://www.w3.org/2019/wot/td/v1",
8282
"@type": current_labthing().types,
8383
"id": url_for("root", _external=True),
84-
"base": url_for("root", _external=True),
84+
"base": request.host_url,
8585
"title": current_labthing().title,
8686
"description": current_labthing().description,
8787
"properties": self.properties,

0 commit comments

Comments
 (0)