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

Reverse proxy to crowdAI #1110

Open
heroxbd opened this issue Apr 30, 2019 · 2 comments
Open

Reverse proxy to crowdAI #1110

heroxbd opened this issue Apr 30, 2019 · 2 comments

Comments

@heroxbd
Copy link

heroxbd commented Apr 30, 2019

I am trying to have a reverse proxy (with a different domain name) to our crowdAI site. But by adding a simple nginx reverse proxy site, e.g.

	location / {
                sub_filter_once off;
                sub_filter_types text/html;
                sub_filter "https://<real domain>" "https://<proxy domain>";
proxy_cache nginx-cache ;
proxy_set_header X-Real-IP $remote_addr;
proxy_set_header REMOTE-HOST $remote_addr;
proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
client_max_body_size 50m;
client_body_buffer_size 256k;
proxy_connect_timeout 30s;
proxy_send_timeout 60s;
proxy_read_timeout 120s;
proxy_buffer_size 256k;
proxy_buffers 4 256k;
proxy_busy_buffers_size 256k;
proxy_temp_file_write_size 256k;
proxy_next_upstream error timeout invalid_header http_500 http_503 http_404;
proxy_max_temp_file_size 128m;
		proxy_pass https://<real-domain>/;
		proxy_redirect default ;
	}

But the site gives unverified_request error:

21:29:49 web.1    | 2019-04-30T13:29:49.373Z 11697 TID-gpzr00u71 INFO: Started POST "/participants/sign_in" for 2001:250:200:1:b586:110:0:1 at 2019-04-30 21:29:49 +0800                                            21:29:49 web.1    |   Participant Load (1.4ms)  SELECT  "participants".* FROM "participants" WHERE "participants"."email" = $1 ORDER BY name ASC LIMIT $2  [["email", "<user email>"], ["LIMIT", 1]]
21:29:49 web.1    | 2019-04-30T13:29:49.606Z 11697 TID-gpzr00u71 FATAL:                                                                                                                                             21:29:49 web.1    | 2019-04-30T13:29:49.606Z 11697 TID-gpzr00u71 FATAL: ActionController::InvalidAuthenticityToken (ActionController::InvalidAuthenticityToken):
21:29:49 web.1    | 2019-04-30T13:29:49.606Z 11697 TID-gpzr00u71 FATAL:   
21:29:49 web.1    | 2019-04-30T13:29:49.606Z 11697 TID-gpzr00u71 FATAL: actionpack (5.2.2) lib/action_controller/metal/request_forgery_protection.rb:211:in `handle_unverified_request'

Is there some documentation to build a reverse proxy for a crowdAI site?

@scarroll32
Copy link
Contributor

Hi @heroxbd, crowdAI was built to run on Heroku, but it is a standard Rails app so should be configurable to run on a VPS. It seems like something is not configured correctly on the server, can I suggest reviewing this guide.

Also, you might do well to ask this question over at AIcrowd, where there is more active development underway on a fork of crowdAI.

That is very interesting you are running a crowdAI instance. Can you tell us about it?

Best,
Sean

@heroxbd
Copy link
Author

heroxbd commented May 2, 2019

Hi @heroxbd, crowdAI was built to run on Heroku, but it is a standard Rails app so should be configurable to run on a VPS. It seems like something is not configured correctly on the server, can I suggest reviewing this guide.

I see. I am going to have a standard Rails apps reverse proxy.

Also, you might do well to ask this question over at AIcrowd, where there is more active development underway on a fork of crowdAI.

What's the relations between AIcrowd and crowdAI? What will happen to crowdAI?

That is very interesting you are running a crowdAI instance. Can you tell us about it?

Sure, we are running it for a neutrino data analysis contest at Tsinghua University, Beijing. The site is available via IPv6 at https://data-contest.net9.org or a (somewhat slow) reverse proxy at https://dc.airelinux.org.

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