Uploaded image for project: 'Dev - Nexus Repo'
  1. Dev - Nexus Repo
  2. NEXUS-25733

NuGet v3 repository index.json generation

    Details

    • Type: Bug
    • Status: Closed
    • Priority: Major
    • Resolution: Fixed
    • Affects Version/s: 3.25.1, 3.29.2
    • Fix Version/s: 3.30.0
    • Component/s: nuget-v3
    • Labels:
      None

      Description

      Hello.

      We have Nexus 3.25.1-04 instance running behind reverse-proxy. As a result it can be accessed via http://external_url and http://internal_url.
      The instance hosts nuget hosted repository, which we want to be available over nuget api version 3.
      Version 3 of the protocol assumes that nuget feed shall be added using /repository/nuget-hosted/index.json URL.

      Given external and internal URLs, nuget feeds look like:
      http://external_url/repository/nuget-hosted/index.json
      http://internal_url/repository/nuget-hosted/index.json

      Expected behavior is that index.json is referencing endpoints using whatever URL was used to access it: when external URL is used, index.json shall reference everything starting from http://external_url and when internal URL is used, index.json shall reference everything starting from http://internal_url

      However, on practice we see that the very first request to nuget repository after Nexus service startup seem to make Nexus "remember" URL and embed it into index.json regardless whether it is accesses over internal or external URL. For instance, if first request is made using http://internal_url/repository/nuget-hosted/index.json, then for all subsequent requests Nexus will reference everything in index.json starting from http://internal_url. Even if subsequent requests are made over http://external_url. Even from different browsers. Even from different PC. The same thing is true for newly created nuget repos also.

      Base URL Capability has no effect on this behavior. The only factor we are currently seeing that has effect is which URL was used to make first request to index.json after Nexus service has started.

      Should it really behave this way? Is there any ways to control index.json generation process? Maybe caching properties or something like Nuget repo URL settings?

        Attachments

          Activity

            People

            Assignee:
            mlukaretkyi Maksym Lukaretkyi
            Reporter:
            slaffka.vlasov Slava Vlasov
            CC:
            Sergey Dedik
            Last Updated By:
            Maksym Lukaretkyi Maksym Lukaretkyi
            Team:
            NXRM - Trinity
            Votes:
            1 Vote for this issue
            Watchers:
            6 Start watching this issue

              Dates

              Created:
              Updated:
              Resolved:
              Date of First Response:

                tigCommentSecurity.panel-title