Uploaded image for project: 'Solr'
  1. Solr
  2. SOLR-9584

The absolute URL path in server/solr-webapp/webapp/js/angular/services.js would make context customization not work

    Details

    • Type: Improvement
    • Status: Closed
    • Priority: Minor
    • Resolution: Fixed
    • Affects Version/s: 6.2
    • Fix Version/s: 6.5, 7.0
    • Component/s: Admin UI
    • Security Level: Public (Default Security Level. Issues are Public)
    • Labels:
    • Flags:
      Patch

      Description

      The absolute path starting from /solr in server/solr-webapp/webapp/js/angular/services.js would make the context customization not work.

      For example, we should use $resource('admin/info/system',

      {"wt":"json", "_":Date.now()}

      ); instead of $resource('/solr/admin/info/system',

      {"wt":"json", "_":Date.now()}

      );

        Issue Links

          Activity

          Hide
          githubbot ASF GitHub Bot added a comment -

          GitHub user zyjibmcn opened a pull request:

          https://github.com/apache/lucene-solr/pull/86

          SOLR-9584 - use relative URL path instead of absolute path starting from /solr for angularjs services

          You can merge this pull request into a Git repository by running:

          $ git pull https://github.com/zyjibmcn/lucene-solr master

          Alternatively you can review and apply these changes as the patch at:

          https://github.com/apache/lucene-solr/pull/86.patch

          To close this pull request, make a commit to your master/trunk branch
          with (at least) the following in the commit message:

          This closes #86


          commit 19e6f0fed60a71f83d919b8c22ad6ed8ca72958a
          Author: Yun Jie Zhou <yunjiez@cn.ibm.com>
          Date: 2016-09-30T15:18:48Z

          use relative URL path instead of absolute path starting from /solr


          Show
          githubbot ASF GitHub Bot added a comment - GitHub user zyjibmcn opened a pull request: https://github.com/apache/lucene-solr/pull/86 SOLR-9584 - use relative URL path instead of absolute path starting from /solr for angularjs services You can merge this pull request into a Git repository by running: $ git pull https://github.com/zyjibmcn/lucene-solr master Alternatively you can review and apply these changes as the patch at: https://github.com/apache/lucene-solr/pull/86.patch To close this pull request, make a commit to your master/trunk branch with (at least) the following in the commit message: This closes #86 commit 19e6f0fed60a71f83d919b8c22ad6ed8ca72958a Author: Yun Jie Zhou <yunjiez@cn.ibm.com> Date: 2016-09-30T15:18:48Z use relative URL path instead of absolute path starting from /solr
          Hide
          ctargett Cassandra Targett added a comment -

          This is a duplicate of SOLR-9000, isn't it?

          Show
          ctargett Cassandra Targett added a comment - This is a duplicate of SOLR-9000 , isn't it?
          Hide
          yjzhou Yun Jie Zhou added a comment -

          Yes, I think it's duplicated, but not sure why it marked as Won't Fix?

          Any concern about removing the absolute URL path prefix /solr? Per testing, it would just work.

          Show
          yjzhou Yun Jie Zhou added a comment - Yes, I think it's duplicated, but not sure why it marked as Won't Fix? Any concern about removing the absolute URL path prefix /solr? Per testing, it would just work.
          Hide
          timo.schmidt Timo Hund added a comment -

          Hi together i would also vote for this patch and regarding the comments on SOLR-9000. I think there are valid comments, that the handling of the routing should happen outside solr, but for me this is an argument, that the urls should be relative, because this allows any outer application to do this. Otherwise you force that solr is allways installed in hostname:port/solr/ and could not be hostname:port/<mypath>/solr/

          Show
          timo.schmidt Timo Hund added a comment - Hi together i would also vote for this patch and regarding the comments on SOLR-9000 . I think there are valid comments, that the handling of the routing should happen outside solr, but for me this is an argument, that the urls should be relative, because this allows any outer application to do this. Otherwise you force that solr is allways installed in hostname:port/solr/ and could not be hostname:port/<mypath>/solr/
          Hide
          janhoy Jan Høydahl added a comment -

          I think I agree more with this change. Proxying Solr behind nginx or something should be possible even if the path is different from /solr/.

          Have you tested your patch? Have you checked whether other parts of Admin UI also has hardcoded /solr/ paths?

          Show
          janhoy Jan Høydahl added a comment - I think I agree more with this change. Proxying Solr behind nginx or something should be possible even if the path is different from /solr/. Have you tested your patch? Have you checked whether other parts of Admin UI also has hardcoded /solr/ paths?
          Hide
          timo.schmidt Timo Hund added a comment -

          It's not my patch, but i can test it if this helps to get it integrated.

          Show
          timo.schmidt Timo Hund added a comment - It's not my patch, but i can test it if this helps to get it integrated.
          Hide
          timo.schmidt Timo Hund added a comment -

          I've checked the patch on my system and with the adaptions i could use the new angular js ui again.

          Show
          timo.schmidt Timo Hund added a comment - I've checked the patch on my system and with the adaptions i could use the new angular js ui again.
          Hide
          upayavira Upayavira added a comment -

          The original intention of SOLR-9000 still stands. We didn't bother supporting non /solr paths, because Solr is moving away from being a webapp.

          However, this particular patch is pretty innocuous, and doesn't appear to change much, so just like Jan Høydahl, I think this would be a reasonable patch to apply.

          Show
          upayavira Upayavira added a comment - The original intention of SOLR-9000 still stands. We didn't bother supporting non /solr paths, because Solr is moving away from being a webapp. However, this particular patch is pretty innocuous, and doesn't appear to change much, so just like Jan Høydahl , I think this would be a reasonable patch to apply.
          Hide
          janhoy Jan Høydahl added a comment -

          I'm testing locally and plan to commit to master. Then some time after 6.4 we can back port to 6.x

          Show
          janhoy Jan Høydahl added a comment - I'm testing locally and plan to commit to master. Then some time after 6.4 we can back port to 6.x
          Hide
          jira-bot ASF subversion and git services added a comment -

          Commit f99c9676325c1749e570b9337a8c67a089d1fb28 in lucene-solr's branch refs/heads/master from Jan Høydahl
          [ https://git-wip-us.apache.org/repos/asf?p=lucene-solr.git;h=f99c967 ]

          SOLR-9584: Support Solr being proxied with another endpoint than default /solr
          This closes #86 - see original commit e0b4caccd3312b011cdfbb3951ea43812486ca98

          Show
          jira-bot ASF subversion and git services added a comment - Commit f99c9676325c1749e570b9337a8c67a089d1fb28 in lucene-solr's branch refs/heads/master from Jan Høydahl [ https://git-wip-us.apache.org/repos/asf?p=lucene-solr.git;h=f99c967 ] SOLR-9584 : Support Solr being proxied with another endpoint than default /solr This closes #86 - see original commit e0b4caccd3312b011cdfbb3951ea43812486ca98
          Hide
          githubbot ASF GitHub Bot added a comment -

          Github user asfgit closed the pull request at:

          https://github.com/apache/lucene-solr/pull/86

          Show
          githubbot ASF GitHub Bot added a comment - Github user asfgit closed the pull request at: https://github.com/apache/lucene-solr/pull/86
          Hide
          timo.schmidt Timo Hund added a comment -

          Thx!

          Show
          timo.schmidt Timo Hund added a comment - Thx!
          Hide
          jira-bot ASF subversion and git services added a comment -

          Commit 3c5393d0787db628629ef3ced088231fc2cc26af in lucene-solr's branch refs/heads/branch_6x from Jan Høydahl
          [ https://git-wip-us.apache.org/repos/asf?p=lucene-solr.git;h=3c5393d ]

          SOLR-9584: Support Solr being proxied with another endpoint than default /solr
          This closes #86 - see original commit e0b4caccd3312b011cdfbb3951ea43812486ca98

          (cherry picked from commit f99c967)

          Show
          jira-bot ASF subversion and git services added a comment - Commit 3c5393d0787db628629ef3ced088231fc2cc26af in lucene-solr's branch refs/heads/branch_6x from Jan Høydahl [ https://git-wip-us.apache.org/repos/asf?p=lucene-solr.git;h=3c5393d ] SOLR-9584 : Support Solr being proxied with another endpoint than default /solr This closes #86 - see original commit e0b4caccd3312b011cdfbb3951ea43812486ca98 (cherry picked from commit f99c967)
          Hide
          jira-bot ASF subversion and git services added a comment -

          Commit 5d0f90a833ed06decc2b57b307c1d4bff3c70cd0 in lucene-solr's branch refs/heads/branch_6x from Yun Jie Zhou
          [ https://git-wip-us.apache.org/repos/asf?p=lucene-solr.git;h=5d0f90a ]

          SOLR-9584: use relative URL path instead of absolute path starting from /solr

          (cherry picked from commit e0b4cac)

          Show
          jira-bot ASF subversion and git services added a comment - Commit 5d0f90a833ed06decc2b57b307c1d4bff3c70cd0 in lucene-solr's branch refs/heads/branch_6x from Yun Jie Zhou [ https://git-wip-us.apache.org/repos/asf?p=lucene-solr.git;h=5d0f90a ] SOLR-9584 : use relative URL path instead of absolute path starting from /solr (cherry picked from commit e0b4cac)
          Hide
          janhoy Jan Høydahl added a comment -

          Reopening to fold in changes from SOLR-10037

          Show
          janhoy Jan Høydahl added a comment - Reopening to fold in changes from SOLR-10037
          Hide
          jira-bot ASF subversion and git services added a comment -

          Commit a81b227cd220118db365904535bc30d4d4cbd718 in lucene-solr's branch refs/heads/branch_6x from Jan Høydahl
          [ https://git-wip-us.apache.org/repos/asf?p=lucene-solr.git;h=a81b227 ]

          SOLR-9584: Use relative URLs also for files and query

          (cherry picked from commit aad9bb7)

          Show
          jira-bot ASF subversion and git services added a comment - Commit a81b227cd220118db365904535bc30d4d4cbd718 in lucene-solr's branch refs/heads/branch_6x from Jan Høydahl [ https://git-wip-us.apache.org/repos/asf?p=lucene-solr.git;h=a81b227 ] SOLR-9584 : Use relative URLs also for files and query (cherry picked from commit aad9bb7)
          Hide
          jira-bot ASF subversion and git services added a comment -

          Commit bd459c12756635450512e95c6d0ee92697c64e5f in lucene-solr's branch refs/heads/master from Jan Høydahl
          [ https://git-wip-us.apache.org/repos/asf?p=lucene-solr.git;h=bd459c1 ]

          SOLR-9584: Use relative URLs also for files and query

          Show
          jira-bot ASF subversion and git services added a comment - Commit bd459c12756635450512e95c6d0ee92697c64e5f in lucene-solr's branch refs/heads/master from Jan Høydahl [ https://git-wip-us.apache.org/repos/asf?p=lucene-solr.git;h=bd459c1 ] SOLR-9584 : Use relative URLs also for files and query
          Hide
          janhoy Jan Høydahl added a comment -

          Also moved CHANGES entry on master

          Show
          janhoy Jan Høydahl added a comment - Also moved CHANGES entry on master

            People

            • Assignee:
              janhoy Jan Høydahl
              Reporter:
              yjzhou Yun Jie Zhou
            • Votes:
              1 Vote for this issue
              Watchers:
              8 Start watching this issue

              Dates

              • Created:
                Updated:
                Resolved:

                Development