Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Some URLs don't have the right scheme even when setting preferred scheme #45

Closed
briantist opened this issue Dec 26, 2022 · 1 comment · Fixed by #46
Closed

Some URLs don't have the right scheme even when setting preferred scheme #45

briantist opened this issue Dec 26, 2022 · 1 comment · Fixed by #46
Assignees
Labels
bug Something isn't working

Comments

@briantist
Copy link
Owner

briantist commented Dec 26, 2022

Related:

It seems there are still some cases where the scheme is not used properly for proxied requests, resulting in incorrect URLs.

cc @jcox10

@briantist briantist added the bug Something isn't working label Dec 26, 2022
@briantist briantist self-assigned this Dec 26, 2022
@briantist
Copy link
Owner Author

Examples:

Merged upstream and local results have the upstream results not use scheme:

URL: http://localhost:5555/api/v2/collections/community/hashi_vault/versions/

Response:
{
    "count": 11,
    "next": null,
    "previous": null,
    "results": [
        {
            "href": "https://localhost:5555/api/v2/collections/community/hashi_vault/versions/2.0.0/",
            "version": "2.0.0"
        },
        {
            "href": "https://localhost:5555/api/v2/collections/community/hashi_vault/versions/3.0.0/",
            "version": "3.0.0"
        },
        {
            "href": "https://localhost:5555/api/v2/collections/community/hashi_vault/versions/3.1.0/",
            "version": "3.1.0"
        },
        {
            "href": "https://localhost:5555/api/v2/collections/community/hashi_vault/versions/3.2.0/",
            "version": "3.2.0"
        },
        {
            "href": "https://localhost:5555/api/v2/collections/community/hashi_vault/versions/3.3.0/",
            "version": "3.3.0"
        },
        {
            "href": "https://localhost:5555/api/v2/collections/community/hashi_vault/versions/3.3.1/",
            "version": "3.3.1"
        },
        {
            "href": "https://localhost:5555/api/v2/collections/community/hashi_vault/versions/3.4.0/",
            "version": "3.4.0"
        },
        {
            "href": "https://localhost:5555/api/v2/collections/community/hashi_vault/versions/4.0.0/",
            "version": "4.0.0"
        },
        {
            "href": "http://localhost:5555/api/v2/collections/community/hashi_vault/versions/2.5.0/",
            "version": "2.5.0"
        },
        {
            "href": "http://localhost:5555/api/v2/collections/community/hashi_vault/versions/2.4.0/",
            "version": "2.4.0"
        },
        {
            "href": "http://localhost:5555/api/v2/collections/community/hashi_vault/versions/2.3.0/",
            "version": "2.3.0"
        }
    ]
}

URL: http://localhost:5555/api/v2/collections/community/hashi_vault/versions/2.3.0

Response:
{
    "artifact": {
        "filename": "community-hashi_vault-2.3.0.tar.gz",
        "sha256": "871b6b8bb7308c420dd20a389579da0e30140692cb313305d892111bdb4dcbc7",
        "size": 169417
    },
    "collection": {
        "href": "http://localhost:5555/api/v2/collections/community/hashi_vault/",
        "name": "hashi_vault"
    },
    "download_url": "http://localhost:5555/download/community-hashi_vault-2.3.0.tar.gz",
    "hidden": false,
    "href": "http://localhost:5555/api/v2/collections/community/hashi_vault/versions/2.3.0/",
    "metadata": {
        "authors": [
            "Julie Davila (@juliedavila) <julie(at)davila.io>",
            "Brian Scholer (@briantist)"
        ],
        "dependencies": {},
        "description": "Plugins related to HashiCorp Vault",
        "documentation": "https://docs.ansible.com/ansible/devel/collections/community/hashi_vault",
        "homepage": "https://github.com/ansible-collections/community.hashi_vault",
        "issues": "https://github.com/ansible-collections/community.hashi_vault/issues",
        "license": [],
        "license_file": "LICENSE",
        "name": "hashi_vault",
        "namespace": "community",
        "readme": "README.md",
        "repository": "https://github.com/ansible-collections/community.hashi_vault",
        "tags": [
            "vault",
            "hashicorp",
            "secret",
            "secrets",
            "password",
            "passwords"
        ],
        "version": "2.3.0"
    },
    "namespace": {
        "name": "community"
    },
    "version": "2.3.0"
}

URL: http://localhost:5555/api/v2/collections/community/hashi_vault/versions/3.1.0

Response:
{
    "artifact": {
        "filename": "community-hashi_vault-3.1.0.tar.gz",
        "sha256": "77c0bb8c336cc6330923f7d7daba156ad664b08f7a7c3b35f9083dbc3b1806c2",
        "size": 202507
    },
    "collection": {
        "href": "https://localhost:5555/api/v2/collections/community/hashi_vault/",
        "name": "hashi_vault"
    },
    "download_url": "https://localhost:5555/download/community-hashi_vault-3.1.0.tar.gz",
    "hidden": false,
    "href": "https://localhost:5555/api/v2/collections/community/hashi_vault/versions/3.1.0/",
    "id": 0,
    "metadata": {
        "authors": [
            "Julie Davila (@juliedavila) <julie(at)davila.io>",
            "Brian Scholer (@briantist)"
        ],
        "dependencies": {},
        "description": "Plugins related to HashiCorp Vault",
        "documentation": "https://docs.ansible.com/ansible/devel/collections/community/hashi_vault",
        "homepage": "https://github.com/ansible-collections/community.hashi_vault",
        "issues": "https://github.com/ansible-collections/community.hashi_vault/issues",
        "license": [
            "GPL-3.0-or-later",
            "BSD-2-Clause"
        ],
        "license_file": null,
        "name": "hashi_vault",
        "namespace": "community",
        "readme": "README.md",
        "repository": "https://github.com/ansible-collections/community.hashi_vault",
        "tags": [
            "vault",
            "hashicorp",
            "secret",
            "secrets",
            "password",
            "passwords"
        ],
        "version": "3.1.0"
    },
    "namespace": {
        "name": "community"
    },
    "version": "3.1.0"
}

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant