Can't create repo when using reverse proxy with nginx

I am trying to setup Gitea (1.2.2. also tested with a build compiled from source, 1.1.0+674-g5866eb2) behind an nginx (1.12.1) reverse proxy to enable ssl. (via proxy_pass) Everything seems to work fine besides the fact that the repository creationpage (under /repo/create) does not load most of the times (it randomly works) and eventually times out. (according to the nginx log)

I already tried setting proxy_connect_timeout, proxy_send_timeout, proxy_read_timeout and send_timeout to higher values (150, 600, 60000) but none of them do the trick. The page works without issues when directly connecting to the port and the gitea log/console looks the same as it does when using the port:

[Macaron] 2017-10-28 21:18:00: Started GET /repo/create for x.x.x.x
2017/10/28 21:18:00 [I] [SQL] SELECT `id`, `lower_name`, `name`, `full_name`, `email`, `keep_email_private`, `passwd`, `login_type`, `login_source`, `login_name`, `type`, `location`, `website`, `rands`, `salt`, `created_unix`, `updated_unix`, `last_login_unix`, `last_repo_visibility`, `max_repo_creation`, `is_active`, `is_admin`, `allow_git_hook`, `allow_import_local`, `allow_create_organization`, `prohibit_login`, `avatar`, `avatar_email`, `use_custom_avatar`, `num_followers`, `num_following`, `num_stars`, `num_repos`, `description`, `num_teams`, `num_members`, `diff_view_style` FROM `user` WHERE `id`=? LIMIT 1 []interface {}{4}
2017/10/28 21:18:00 [I] [SQL] SELECT count(*) FROM `notification` WHERE user_id = ? AND status = ? []interface {}{4, 0x1}
2017/10/28 21:18:00 [I] [SQL] SELECT * FROM `user` INNER JOIN `org_user` ON `org_user`.org_id=`user`.id WHERE `org_user`.uid=? AND `org_user`.is_owner=? ORDER BY `updated_unix` DESC, `user`.`name` ASC []interface {}{4, true}
[Macaron] 2017-10-28 21:18:00: Completed /repo/create 200 OK in 37.782009ms

I’m a bit out of ideas on what to try next, maybe someone else had a similar problem before?

Sorry for the late reply. You should create a bug report on the issues:

I didn’t really want to open an issue as long as I couldn’t confirm that it is an issue with gitea itself as I suspect that the error is somewhere in my setup.