Roundup Tracker - Issues

Message7559

Author rouilj
Recipients marcus.priesch, rouilj, schlatterbeck
Date 2022-06-07.12:48:30
Message-id <20220607124826.5BC1E6A01A6@pe15.cs.umb.edu>
In-reply-to
Interesting that Marcus' email doesn't show up in the web interface.
I did receive it. Ralf did you get it as well?

Forwarding the body to see if this causes an error of some sort.

Also Marcus sorry you were out of sick leave. Hope you are feeling
better. Thanks for the confirmation that this works. Did you use my
second patch (Fixed2) or the original(Fixed1)?

   ====
Content-Transfer-Encoding: quoted-printable
Subject: [issue2551203] Add support for CORS preflight request
From: Marcus Priesch <issues@roundup-tracker.org>
Date: Tue, 07 Jun 2022 09:56:18 +0000

Marcus Priesch added the comment:

Hi John,

sorry for not answering for that long, but i was off for sick-leave :(

Thanks for the patch, i have tested it and it works !

unsetting allowed_api_origins leads to a 400, setting it to * or
http://localhost:8081 (where the frontend server is running) works :)

so i think for this we can apply this patch and go ahead ;)

btw: as per your request, here are the headers from the preflight=20
request as seen from devtools:

request:

OPTIONS=20
/t/rest/data/time_activity?@sort=3Dname&@verbose=3D0&@fields=3Dname,id,desc=
ription,travel&is_valid=3D1=20
HTTP/1.1
Accept: */*
Accept-Encoding: gzip, deflate, br
Accept-Language: en-US,en;q=3D0.9,de;q=3D0.8
Access-Control-Request-Headers: content-type,x-requested-with
Access-Control-Request-Method: GET
Cache-Control: no-cache
Connection: keep-alive
Host: localhost:8080
Origin: http://localhost:8081
Pragma: no-cache
Referer: http://localhost:8081/
Sec-Fetch-Dest: empty
Sec-Fetch-Mode: cors
Sec-Fetch-Site: same-site
User-Agent: Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML,=20
like Gecko) Chrome/101.0.4951.64 Safari/537.36
=EF=BF=BC
answer:

HTTP/1.1 204 No Content
Server: BaseHTTP/0.3 Python/2.7.18
Date: Tue, 07 Jun 2022 09:49:24 GMT
Access-Control-Allow-Methods: OPTIONS, GET, POST
Access-Control-Max-Age: 86400
Vary: Origin, Origin
Allow: OPTIONS, GET, POST
Access-Control-Allow-Credentials: true
Access-Control-Allow-Origin: http://localhost:8081
Access-Control-Allow-Headers: Content-Type, Authorization,=20
X-Requested-With, X-HTTP-Method-Override

thanks for the nice work and good support !

regards,
marcus.

------- End of Forwarded Message
History
Date User Action Args
2022-06-07 12:48:31rouiljsetrecipients: + rouilj, schlatterbeck, marcus.priesch
2022-06-07 12:48:30rouiljlinkissue2551203 messages
2022-06-07 12:48:30rouiljcreate