[GH-ISSUE #260] CORS Support #118

Closed
opened 2026-02-25 22:34:24 +03:00 by kerem · 2 comments
Owner

Originally created by @odysseyjason on GitHub (Aug 11, 2020).
Original GitHub issue: https://github.com/flyimg/flyimg/issues/260

I needed this to work on a docker on localhost, but with CORS support for a webgl threejs application. I could not find any documentation on how to enable this in any ini settings so I added the following code to app.php and it took care of the problem completely.

header("Access-Control-Allow-Origin: *");
header("Access-Control-Allow-Credentials: true");
header("Access-Control-Max-Age: 1000");
header("Access-Control-Allow-Headers: X-Requested-With, Content-Type, Origin, Cache-Control, Pragma, Authorization, Accept, Accept-Encoding");
header("Access-Control-Allow-Methods: PUT, POST, GET, OPTIONS, DELETE");

.....

Perhaps it should be configurable?

Originally created by @odysseyjason on GitHub (Aug 11, 2020). Original GitHub issue: https://github.com/flyimg/flyimg/issues/260 I needed this to work on a docker on localhost, but with CORS support for a webgl threejs application. I could not find any documentation on how to enable this in any ini settings so I added the following code to app.php and it took care of the problem completely. header("Access-Control-Allow-Origin: *"); header("Access-Control-Allow-Credentials: true"); header("Access-Control-Max-Age: 1000"); header("Access-Control-Allow-Headers: X-Requested-With, Content-Type, Origin, Cache-Control, Pragma, Authorization, Accept, Accept-Encoding"); header("Access-Control-Allow-Methods: PUT, POST, GET, OPTIONS, DELETE"); ..... Perhaps it should be configurable?
kerem 2026-02-25 22:34:24 +03:00
  • closed this issue
  • added the
    stale
    label
Author
Owner

@github-actions[bot] commented on GitHub (Aug 10, 2023):

This issue is stale because it has been open for 30 days with no activity.

<!-- gh-comment-id:1672443523 --> @github-actions[bot] commented on GitHub (Aug 10, 2023): This issue is stale because it has been open for 30 days with no activity.
Author
Owner

@github-actions[bot] commented on GitHub (Aug 25, 2023):

This issue was closed because it has been inactive for 14 days since being marked as stale.

<!-- gh-comment-id:1692649841 --> @github-actions[bot] commented on GitHub (Aug 25, 2023): This issue was closed because it has been inactive for 14 days since being marked as stale.
Sign in to join this conversation.
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference
starred/flyimg#118
No description provided.