oracle / opengrok

OpenGrok is a fast and usable source code search and cross reference engine, written in Java
http://oracle.github.io/opengrok/
Other
4.34k stars 745 forks source link

Enable Cross Origin Requests for OpenGrok #2710

Closed wy193777 closed 5 years ago

wy193777 commented 5 years ago

OpenGrok already has REST API provided for users. So cross origin requests should be enabled by default otherwise other services will not be able to take advantage of REST API.

vladak commented 5 years ago

I guess this is about adding a CORS filter to web.xml + make it configurable.

tulinkry commented 5 years ago

This should be part of the api only, so some filter for the REST API. Currently public API is only:

other paths are available only for localhost so CORS filter does not make sense I think.

vladak commented 5 years ago

Good point.

Dne út 12. 3. 2019 13:04 uživatel Kryštof Tulinger notifications@github.com napsal:

This should be part of the api only, so some filter for the REST API. Currently public API is only:

  • SearchController.PATH
  • SuggesterController.PATH
  • SuggesterController.PATH + "/config"

other paths are available only for localhost so CORS filter does not make sense I think.

— You are receiving this because you commented. Reply to this email directly, view it on GitHub https://github.com/oracle/opengrok/issues/2710#issuecomment-471972843, or mute the thread https://github.com/notifications/unsubscribe-auth/ACzGDEFl141gRcql0qwyMGCy1mEYGP6kks5vV5fegaJpZM4bpoEU .

wy193777 commented 5 years ago

Can we include this change to newest release? It's really hard to config the opengrok. I just want to run it with docker container.

vladak commented 5 years ago

Yep, will make a release soonish.

Dne st 20. 3. 2019 20:44 uživatel Shenghan Gao notifications@github.com napsal:

Can we include this change to newest release? It's really hard to config the opengrok. I just want to run it with docker container.

— You are receiving this because you modified the open/close state. Reply to this email directly, view it on GitHub https://github.com/oracle/opengrok/issues/2710#issuecomment-474999414, or mute the thread https://github.com/notifications/unsubscribe-auth/ACzGDOI5SMlco21B8UOD_gA7z3lt2TCXks5vYo-EgaJpZM4bpoEU .

vladak commented 5 years ago

Also, I wonder what makes it so hard for you to configure it ?

Dne st 20. 3. 2019 21:07 uživatel Vladimír Kotal vlada@devnull.cz napsal:

Yep, will make a release soonish.

Dne st 20. 3. 2019 20:44 uživatel Shenghan Gao notifications@github.com napsal:

Can we include this change to newest release? It's really hard to config the opengrok. I just want to run it with docker container.

— You are receiving this because you modified the open/close state. Reply to this email directly, view it on GitHub https://github.com/oracle/opengrok/issues/2710#issuecomment-474999414, or mute the thread https://github.com/notifications/unsubscribe-auth/ACzGDOI5SMlco21B8UOD_gA7z3lt2TCXks5vYo-EgaJpZM4bpoEU .

wy193777 commented 5 years ago
  1. To let OpenGrok run properly, first need to install several dependencies, such as ctags, tomcat. I already had them.
  2. After installed those dependencies, I need to unzip the build result, copy paste the source.war to Tomcat path.
  3. After the application is up and running, I also have to manually edit web.xml and a configuration file somewhere.
  4. I also have to manually run indexer to index code.

None of them is hard, but all steps combined take at least one or two hours to setup. Also sometimes there are conditions on local machine, then the configuration might took someone forever(my experience with tomcat). As a developer spoiled by npm, python and other tools, I would expect apps can run with copy paste a few commands.

wy193777 commented 5 years ago

Maybe we can add a Dockerfile for people to easily run the application from source code.

vladak commented 5 years ago

That will probably happen in some time by folding the OpenGrok/docker repo onto the main OpenGrok repo.

Dne st 20. 3. 2019 22:21 uživatel Shenghan Gao notifications@github.com napsal:

Maybe we can add a Dockerfile for people to easily run the application from source code.

— You are receiving this because you modified the open/close state. Reply to this email directly, view it on GitHub https://github.com/oracle/opengrok/issues/2710#issuecomment-475033397, or mute the thread https://github.com/notifications/unsubscribe-auth/ACzGDEKKHvRc32J8VHmXJfiZ9tDby5fBks5vYqZXgaJpZM4bpoEU .