-
-
Notifications
You must be signed in to change notification settings - Fork 101
Description
Description
Currently it is not possible to natively use flask blueprints subdomains wildcards, because JSONRPCAPI.jsonrpc method in flask backend doesn't handle additional argument if blueprint subdomain is defined as a wildcard, i.e.
app.register_blueprint(api.as_blueprint(), subdomain='<subdomain>')
In this way, the api can be used through api.example.com or api2.example.com or other.example.com.
Steps to Reproduce
- Define api endpoint
- Register endpoint as a blueprint with wildcard subdomain
- Perform call to an endpoint
Expected behavior: api can be used through registered endpoint and subdomain wildcard is available in the jsonrpc method.
Actual behavior: jsonrpc raises an exception, that it can't accept additional argument, i.e. subdomain.
Reproduces how often: always
Versions
- Ubuntu 16.04
- Python 3.6.3
nginx 1.10.3or/etc/hostsjson-rpc 1.10.8
Additional Information
I can see there are multiple ways this can be solved. For now I am using a workaround to handle subdomains in the application, which involves nginx and setting some headers.
I would also like to contribute and make this possible, what are your thoughts on this feature?