Hi Eric,

Yes, you are right. The REMOTE_USER was stripped out by apache. After
setting it in the header of the proxy config, now it works perfect. For
uploading, currently all files are uploaded by an admin user and assigned
to common users. don't know if any other problems there.
Thanks for your help.

Cheers,
Yanbo

Eric Rasche <e...@tamu.edu>于2015年6月4日周四 下午11:47写道:

> 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" <yeyanbo...@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:
>>
>> [image: 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*
>>
>> *Email: ye_ya...@gibh.ac.cn <ye_ya...@gibh.ac.cn>*
>> *Web: http://www.yeyanbo.com <http://www.yeyanbo.com>*
>> *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/
>>
>
___________________________________________________________
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/

Reply via email to