Closed gduverger closed 6 years ago
It looks like the force_external keyword argument of werkzeug.routing.MapAdapter.build (http://werkzeug.pocoo.org/docs/0.14/routing/#werkzeug.routing.MapAdapter.build) is not propagated by apistar.server.Router.reverse_url (https://github.com/encode/apistar/blob/master/apistar/server/router.py#L106). Is there another way to get a full canonical external URL in API Star? If not, could the behavior of reverse_url be updated to allow for passing that parameter? Thank you for reading.
force_external
werkzeug.routing.MapAdapter.build
apistar.server.Router.reverse_url
reverse_url
Not easily no. Flask keeps a global request context, which API Star doesn't have, so there's no way to automatically determine what hostname to use.
Okay. Thank you for the explanation, Tom.
It looks like the
force_external
keyword argument ofwerkzeug.routing.MapAdapter.build
(http://werkzeug.pocoo.org/docs/0.14/routing/#werkzeug.routing.MapAdapter.build) is not propagated byapistar.server.Router.reverse_url
(https://github.com/encode/apistar/blob/master/apistar/server/router.py#L106). Is there another way to get a full canonical external URL in API Star? If not, could the behavior ofreverse_url
be updated to allow for passing that parameter? Thank you for reading.