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

Enabling Cross-Origin Resource Sharing (CORS) in Dockerfile? #35

Closed
KonradHoeffner opened this issue Nov 4, 2021 · 6 comments
Closed

Comments

@KonradHoeffner
Copy link

According to the Wiki, one can enable CORS in the conductor web interface, but I want to enable that by default in a Docker image based on this one. Is it possible to configure this container in that way and if yes, how?

@KonradHoeffner KonradHoeffner changed the title Enabling Cross-Origin Resource Sharing (CORS) by default? Enabling Cross-Origin Resource Sharing (CORS) in Dockerfile? Nov 4, 2021
@TallTed
Copy link
Contributor

TallTed commented Nov 4, 2021

The guidance I just provided in your other issue (#34) is applicable to this as well.

@langens-jonathan
Copy link
Member

Hey Konrad, Openlink has provided a great guide on how to enable CORS: http://vos.openlinksw.com/owiki/wiki/VOS/VirtTipsAndTricksCORsEnableSPARQLURLs. I believe you can also do it through a isql statement. So that could be added in a custom image with a separate RUN command.

@KonradHoeffner
Copy link
Author

@langens-jonathan Hello Jonathan, thanks for the link, however that is the same one as posted at the top, which shows how to do it using a graphical user interface but not how to do it using ISQL.

@KonradHoeffner
Copy link
Author

@TallTed: Thank you for the guidance, I will implement that!

@nvdk
Copy link
Member

nvdk commented Nov 24, 2021

@KonradHoeffner, fyi in our fork you can enable the CORS setting with a env flag if you want: https://github.com/redpencilio/docker-virtuoso/ . I think it should be fairly trivial to extract and create a PR to the tenforce image if you have the time.

@KonradHoeffner
Copy link
Author

@nvdk: Thanks! Just executing update DB.DBA.HTTP_PATH set HP_OPTIONS = serialize(vector('browse_sheet', '', 'noinherit', 'yes', 'cors', '*', 'cors_restricted', 0)) where HP_LPATH = '/sparql'; in the setup SQL script worked!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

4 participants