I can't speak to your CORS issues, but you may have to add some custom CORS header in your webserver.

If you have a webserver in front of Galaxy, it is absolutely for sure stripping REMOTE_USER out.

If you're using remote_user authentication, you'll have to do something a bit different, and configure the API route in apache to not use authentication (as it's already authenticated with the user's API key from the command line.), and instead pass a dummy value for REMOTE_USER, as galaxy requires that value be there, even if empty.

However, that will break other things (like upload for some users), so what we do is to have a seperate unauthenticated API route when using like /galaxy/api2/

I don't have completely working configs yet, so maybe someone else can chime in.

Cheers,
Eric

4. jun. 2015 03.05 skrev "Yanbo Ye" <yeyanbo289@gmail.com>:

Hi, all

I’m trying to access the api of my local galaxy instance from another site, under the remote user mode.

At first, I sent request directly to the galaxy server. and it was OK when I test it using Postman (with ‘Remote-User’ in the header). But there’s CORS issue when I use it on my site. The preflight OPTIONS request gave me 403 error.

So, I then tried to proxy the galaxy server to a location of the same domain of my site using apache. Now there’s no CORS issue. But it now ask me for authentication to use the api. Seems the ‘Remote-User’ value doesn’t work anymore.

the request:

Inline image 1

error response:

{"traceback": "No traceback available.", "err_msg": "API authentication required for this request", "err_code": 403001}

Any one knows why?

best,
Yanbo
--

Yanbo Ye
Guangzhou Institutes of Biomedicine and Health, 
Chinese Academy of Sciences
190 Kaiyuan Avenue, Science Park, Guangzhou, China

Phone: (86)-020-32093810

___________________________________________________________
Please keep all replies on the list by using "reply all"
in your mail client.  To manage your subscriptions to this
and other Galaxy lists, please use the interface at:
  https://lists.galaxyproject.org/

To search Galaxy mailing lists use the unified search at:
  http://galaxyproject.org/search/mailinglists/