l3ender / nexus-repository-ansiblegalaxy

A Nexus Repository 3 plugin that allows usage of Ansible Galaxy repositories.
29 stars 10 forks source link

Support plugin behind a reverse proxy #17

Open fuckingdarkknight opened 1 year ago

fuckingdarkknight commented 1 year ago

Hello,

I've a nexus behind a nginx reverse proxy, the configuration is like below :

    location /ansiblegalaxy {
        proxy_pass http://127.0.0.1:8081/repository/ansiblegalaxy-proxy;
    }
    location / {
        return 403;
    }

I'm doing this kind of test :

ansible-galaxy collection install azure.azcollection -s https://XXX/ansiblegalaxy/
Starting galaxy collection install process
Process install dependency map
Starting collection install process
Downloading https://XXX/repository/ansiblegalaxy-proxy/download/azure-azcollection-1.15.0.tar.gz to /home/batman/.ansible/tmp/ansible-local-218846c_iepoj9/tmppmvco8cw/azure-azcollection-1.15.0-qc8c46wk
ERROR! Failed to download collection tar from 'cmd_arg': HTTP Error 403: Forbidden

The downloading URL match to nexus URL and not the proxy_pass directive.

Could it be possible for you do to someting on this issue ?

Thanks by advance, else your plugin works perfectly good. Good works ;-)