[OJS3] File uploads blocked in reverse proxy setup with enforced HTTPS

When installing OJS 3.1.0-1 in a HTTPS reverse proxy environment we encounter issues with file uploads and stylesheets. @hermann’s workaround (OJS 3 behind reverse proxy - how to achieve?) resolved the stylesheet problems but file uploads remain blocked.

Our configuration is indeed similar to Hermann’s where the main proxy server enforces https but forwards http requests to our server (where OJS is installed).

How could we resolve this?

Hi @karatatatat,

Can you describe what happens when you try to upload files?

Regards,
Alec Smecher
Public Knowledge Project Team

Hi @asmecher,

here is what we get:

upload page:
https://jhnr.uni.lu/index.php/jhnr/submission/wizard/2?submissionId=34#step-2

upload endpoint, where the actual request is failing:
POST
https://jhnr.uni.lu/index.php/jhnr/$$$call$$$/wizard/file-upload/file-upload-wizard/upload-file?submissionId=34&stageId=1&fileStage=2&reviewRoundId=&assocType=&assocId=

request headers
Accept:/
Accept-Encoding:gzip, deflate, br
Accept-Language:fr,it-IT;q=0.9,it;q=0.8,en-US;q=0.7,en;q=0.6,es;q=0.5
browser_user_agent:Mozilla/5.0 (Macintosh; Intel Mac OS X 10_13_3) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/64.0.3282.167 Safari/537.36
Connection:keep-alive
Content-Length:118822
Content-Type:multipart/form-data; boundary=----WebKitFormBoundary4XZS3NnyedX1LTZh
Cookie:OJSSID=xyx; xyz; xyx
Host:jhnr.uni.lu
Origin:https://jhnr.uni.lu
Referer:https://jhnr.uni.lu/index.php/jhnr/submission/wizard/2?submissionId=34
User-Agent:Mozilla/5.0 (Macintosh; Intel Mac OS X 10_13_3) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/64.0.3282.167 Safari/537.36
submissionId:34
stageId:1
fileStage:2
reviewRoundId:
assocType:
assocId:

we get this :

Request RejectedThe requested URL was rejected. Please consult with your administrator.

Your support ID is: XYZ that looks like a rejected request form our proxy server.

Is there some configuration from OJS?

Hi @karatatatat,

It looks like the request is being rejected by your proxy, not by OJS – you’d have to look into its configuration or logs to determine whether there’s some rule that’s being triggered.

Regards,
Alec Smecher
Public Knowledge Project Team

Many thanks @asmecher, we will investigate further…