Skip to content

Reverse proxy to crowdAI #1110

@heroxbd

Description

@heroxbd

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?

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions