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

NWB file browsing #82

Open
arnodelorme opened this issue Jul 8, 2024 · 7 comments
Open

NWB file browsing #82

arnodelorme opened this issue Jul 8, 2024 · 7 comments
Assignees

Comments

@arnodelorme
Copy link
Collaborator

arnodelorme commented Jul 8, 2024

Yaroslav's message

just in case, here is my setup in apache to allow access to my files
accessed by some 3rd party services... I don't think it is needed for
neurosift but I could be wrong

 <IfModule mod_headers.c>
   # <FilesMatch "\.(nii|nii.gz)$">
   <FilesMatch "\.*$">
     # To offload rendering etc to bioimagesuiteweb
     SetEnvIf Origin "http(s)?://(www\.)?([datalad.org](http://datalad.org/)|[bioimagesuiteweb.github.io](http://bioimagesuiteweb.github.io/)|[bisweb.yale.edu](http://bisweb.yale.edu/)|[neuroglancer-demo.appspot.com](http://neuroglancer-demo.appspot.com/))$" AccessControlAllowOrigin=$0
     Header add Access-Control-Allow-Origin %{AccessControlAllowOrigin}e env=AccessControlAllowOrigin
     Header merge Vary Origin
   </FilesMatch>
 </IfModule>
@arnodelorme
Copy link
Collaborator Author

@cdesyoun example files are in example in the following folder

nemar/arno/nwb_example_files

@cdesyoun
Copy link
Collaborator

cdesyoun commented Jul 9, 2024

@arnodelorme
Copy link
Collaborator Author

Yes, @cdesyoun . Thank you for trying. I think the permission you need to set are more than download. It is access by a 3rd party site. These are usually blocked. This is what the code I shared does.

@cdesyoun
Copy link
Collaborator

cdesyoun commented Jul 11, 2024

Arno, in our case, we don't need the provided configuration snippet since NEMAR files are publicly accessible to any third parties via the NEMAR download link.
This configuration snippet is intended to set cross-origin resource sharing (CORS) headers for specific third-party services accessing files on the server. It ensures that resources can be requested from another domain, which is necessary for web applications to function correctly when fetching resources from different origins.
The snippet sets an environment variable, 'AccessControlAllowOrigin', to the value of the Origin header if it matches one of the specified domains.
However, the neurosift domain is not included, which means only the specified domains can access the resources.
We should ask the neurosift team how to access NEMAR files in their interface and provide the NEMAR data access URLs.

@arnodelorme
Copy link
Collaborator Author

arnodelorme commented Jul 11, 2024 via email

@cdesyoun
Copy link
Collaborator

On Neurosift's GitHub page, I found this issue link: flatironinstitute/neurosift#129.
I left a comment regarding the use of third-party data in the Neurosift interface.

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

2 participants