Bug 1390412
Summary: | creating a group fails with "HTTP request aborted" (CORS denial) when Beaker is behind an SSL-terminating reverse proxy | ||
---|---|---|---|
Product: | [Retired] Beaker | Reporter: | Dan Callaghan <dcallagh> |
Component: | general | Assignee: | Dan Callaghan <dcallagh> |
Status: | CLOSED CURRENTRELEASE | QA Contact: | Dan Callaghan <dcallagh> |
Severity: | unspecified | Docs Contact: | |
Priority: | unspecified | ||
Version: | 23 | CC: | dcallagh, mjia, rjoost |
Target Milestone: | 23.3 | Keywords: | Patch |
Target Release: | --- | ||
Hardware: | Unspecified | ||
OS: | Unspecified | ||
Whiteboard: | |||
Fixed In Version: | Doc Type: | If docs needed, set a value | |
Doc Text: | Story Points: | --- | |
Clone Of: | Environment: | ||
Last Closed: | 2016-11-07 06:44:37 UTC | Type: | Bug |
Regression: | --- | Mount Type: | --- |
Documentation: | --- | CRM: | |
Verified Versions: | Category: | --- | |
oVirt Team: | --- | RHEL 7.3 requirements from Atomic Host: | |
Cloudforms Team: | --- | Target Upstream Version: | |
Embargoed: |
Description
Dan Callaghan
2016-11-01 02:22:42 UTC
As a workaround, it is possible to manually correct the URL on the Backbone collection prior to making any AJAX requests, so that they will go to the right place and not trigger CORS denials. In the case of the groups grid on Fedora Beaker, use the browser dev console to run: collection.url = 'https://beaker.qa.fedoraproject.org/groups/' Similarly for other pages (adjust the URL as needed). So there are only two situations I can see where we are using any of the Flask request attributes which produce an absolute URL, namely request.base_url, request.url, or request.url_root: http://flask.pocoo.org/docs/0.11/api/#flask.Request.path It's used in json_collection() for the "forced pagination" redirect functionality. In that case we can build the redirect URL using request.path and then pass it to our absolute_url() utility function. The other case is in all the Backgrid pages where it's passed down to the template to set the collection URL (that includes the groups grid which is the original page this bug report was about). In those cases we can just use a relative URL instead. http://gerrit.beaker-project.org/5393 Unfortunately I don't think we can cover this specific situation (SSL-terminating reverse proxy) in our automated tests, but we can at least be confident that this doesn't break anything for the simpler case we have (with no reverse proxies). Beaker 23.3 has been released. |