You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
The search API works and is reachable at https://data.example.org/search-api.
However, this is very inconvenient, as it shadows the whole URL tree, because any request will be absorbed by the WSGI application. Nothing else besides /search-api is reachable at https://data.example.org/ anymore, unless it is explicitely aliased.
For HZB this is also a problem, because I normally want to have a redirection from https://data.helmholtz-berlin.de/ to the ICAT web UI at https://topcat.hemlholtz-berlin.de/. This redirection is now lost after I deployed the search API as described above at https://data.helmholtz-berlin.de/search-api. I can't resurrect that redirection with an explicit alias, because I can't redirect / at the same time as having a WSGI script alias at /.
Obviously, what I would like to do is that only requests to the search API will be handled by the WSGI script. E.g., I would like to configure something like
If I try this with the same config.yaml as above, I get a 404 Not found at https://data.example.org/search-api. The search API is apparently listening at https://data.example.org/search-api/search-api, but it does not work properly, because Swagger tries to load the API definition from https://data.example.org/search-api/openapi.json, which fails. It is available at https://data.example.org/search-api/search-api/openapi.json instead.
If I try to deploy the WSGI at /search-api as above and set the following in the config.yaml:
search_api:
extension: ""
Then the search API is again apparently listening at https://data.example.org/search-api, but I get just a blank page. The reason becomes obvious obvious if I look into the HTML source:
<!-- HTML for static distribution bundle build --><!DOCTYPE html><htmllang="en"><head><metacharset="UTF-8"><title>Search API OpenAPI Spec</title><linkrel="stylesheet" type="text/css" href="/index.css"><linkrel="stylesheet" type="text/css" href="/swagger-ui.css"><linkrel="icon" type="image/png" href="/favicon-32x32.png" sizes="32x32" /><linkrel="icon" type="image/png" href="/favicon-16x16.png" sizes="16x16" /></head><body><divid="swagger-ui"></div><scriptsrc="/swagger-ui-bundle.js"></script><scriptsrc="/swagger-ui-standalone-preset.js"></script><!-- ... --></body></html>
It tries to load its components (CSS and JS) from /... instead of /search-api/..., which obviously must fail.
Essentially the same happens if I put extension: "/" in the config.yaml.
Acceptance criteria:
get deploying of the search API using WSGIScriptAlias /search-api ... to work.
The text was updated successfully, but these errors were encountered:
Note, deploying under an alias via WSGIScriptAlias does work - in fact this is what we do at ISIS with datagateway api configured as "/" and search api configured as "/search-api" - if you ping the API using the ping command /ping it should respond under the WSGIScriptAlias and all other requests work as normal. However, yes the swagger UI does not load in the case of the "/" alias, so what I'm working on should fix that.
Description:
datagateway-api
works fine when deployed in Apache with mod_wsgi, if it is deployed at the document root.E.g., if you have something like the following:
httpd.conf
:config.yaml
:The search API works and is reachable at
https://data.example.org/search-api
.However, this is very inconvenient, as it shadows the whole URL tree, because any request will be absorbed by the WSGI application. Nothing else besides
/search-api
is reachable athttps://data.example.org/
anymore, unless it is explicitely aliased.For HZB this is also a problem, because I normally want to have a redirection from
https://data.helmholtz-berlin.de/
to the ICAT web UI athttps://topcat.hemlholtz-berlin.de/
. This redirection is now lost after I deployed the search API as described above athttps://data.helmholtz-berlin.de/search-api
. I can't resurrect that redirection with an explicit alias, because I can't redirect/
at the same time as having a WSGI script alias at/
.Obviously, what I would like to do is that only requests to the search API will be handled by the WSGI script. E.g., I would like to configure something like
in the
httpd.conf
.But that doesn't seem to work.
If I try this with the same
config.yaml
as above, I get a404 Not found
athttps://data.example.org/search-api
. The search API is apparently listening athttps://data.example.org/search-api/search-api
, but it does not work properly, because Swagger tries to load the API definition fromhttps://data.example.org/search-api/openapi.json
, which fails. It is available athttps://data.example.org/search-api/search-api/openapi.json
instead.If I try to deploy the WSGI at
/search-api
as above and set the following in theconfig.yaml
:Then the search API is again apparently listening at
https://data.example.org/search-api
, but I get just a blank page. The reason becomes obvious obvious if I look into the HTML source:It tries to load its components (CSS and JS) from
/...
instead of/search-api/...
, which obviously must fail.Essentially the same happens if I put
extension: "/"
in theconfig.yaml
.Acceptance criteria:
WSGIScriptAlias /search-api ...
to work.The text was updated successfully, but these errors were encountered: