-
Notifications
You must be signed in to change notification settings - Fork 26
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
CORS issues on some servers #118
Comments
If I change the import panel as pn
from ipyaladin import Aladin
pn.extension("ipywidgets")
aladin = Aladin(
survey="https://alasky.cds.unistra.fr/DECaPS/DR1/color/",
show_coo_grid=True,
target="galactic center",
coo_frame="galactic",
fov=40,
height=600,
)
pn.panel(aladin).servable() But CORS issue remains. |
That is what ChatGPT says is required to fix the issue: The error message you're seeing is related to Cross-Origin Resource Sharing (CORS) policy. This is a security measure implemented by web browsers to prevent requests to different domains (cross-origin requests) unless the server specifies that it allows such requests. In this case, the server at 'https://alasky.cds.unistra.fr/' is not sending the 'Access-Control-Allow-Origin' header in its response, which is why the browser is blocking the request. To fix this issue, the server administrator for 'https://alasky.cds.unistra.fr/' needs to update the server's configuration to include the 'Access-Control-Allow-Origin' header in its responses. This header should be set to the origin of the request ('https://SOMe-DOMAIN/' in this case) or to '*' to allow requests from any origin. If you don't have control over the server at 'https://alasky.cds.unistra.fr/', you might need to contact the server administrator or the service provider and ask them to make this change. |
Using import panel as pn
from ipyaladin import Aladin
pn.extension("ipywidgets")
aladin = Aladin(
target="159.2135528 -58.6241989",
survey="https://alasky.u-strasbg.fr/Planets/Mars_Viking_MDIM21",
fov=10,
height=800,
)
pn.panel(aladin, sizing_mode="stretch_width").servable() aladin-panel.mp4Just a comment. For data app usage it would be really nice to be able to set the |
When I try to integrate example 05 I also get CORS error 05_linked_widgets:1 Access to fetch at 'https://irsa.ipac.caltech.edu/data/hips/CDS/DSS2/color/properties' from origin 'https://SOME-DOMAIN' has been blocked by CORS policy: No 'Access-Control-Allow-Origin' header is present on the requested resource. If an opaque response serves your needs, set the request's mode to 'no-cors' to fetch the resource with CORS disabled. |
Hi!
|
Hi all, @MarcSkovMadsen : regarding the CORS issue message for the linked widgets example, I think it does not prevent ipyaladin from working. Actually, Aladin Lite will try to find the fastest mirror delivering the requested dataset. If a mirror is not available or not reachable (CORS issue for instance), it should fall back to another one, for instance alasky.cds.unistra.fr or alaskybis.cds.unistra.fr @ManonMarchand : I think that in our examples, we should not set HiPS with URLs, but with their ID instead. If we want to give an example with a URL, it should be HTTPS. |
Changed from url to ID in example 1 (in c3dc659) |
Hi
I wanted to explore ipyaladin in a Panel data app starting from this example https://github.com/cds-astro/ipyaladin/blob/master/examples/01_Getting_Started.ipynb.
Normally I can use AnyWidget components with Panel if I've installed the prerequisites:
Then create a file called app.py.
and serve it by running the below in a terminal:
Finally open it. On a laptop it would be at at http://localhost:5006. But I'm working on a Jupyterhub so its served behind a reverse proxy at
https://SOME-DOMAIN/SOME-PATH/vscode/proxy/5006/
I'm not an expert here but I think that two things could be fixed here in ipyaladin or in aladin-lite?
https
and nothttp
protocol.I think these issues are not specifically related to Panel. Other users working in notebooks on JupyterHub/ Binder or trying to deploy data apps based on ipyaladin using for example Jupyter Voila server, Shiny Py or Solara would experience the same issues.
The text was updated successfully, but these errors were encountered: