mirror of
https://github.com/HaschekSolutions/pictshare.git
synced 2026-04-25 23:15:51 +03:00
[GH-ISSUE #164] make Access-Control-Allow-Origin configurable #129
Labels
No labels
Feature request
Feature request
bug
cant reproduce
enhancement
help wanted
pull-request
wontfix
No milestone
No project
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set.
Reference
starred/pictshare#129
Loading…
Add table
Add a link
Reference in a new issue
No description provided.
Delete branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Originally created by @sgohl on GitHub (May 13, 2025).
Original GitHub issue: https://github.com/HaschekSolutions/pictshare/issues/164
When referencing an uploaded image via webgl from another webapp, browsers deny due to CORS
For an image share app, I feel it's crucial to at least have it configurable to be able to opt for
Access-Control-Allow-Origin "*"I think, reasonable would be an include statement in the main nginx conf, a dynamic generated nginx-conf snippet file combined with a conditional in
start.shthat writes the statement to this snippet file in case a variable is set, probably even evaluate the env value@sgohl commented on GitHub (May 13, 2025):
I'm not sure whether to do it this way (dedicated env var) or to provide a more general way of adding nginx snippets what would be my preferred option, but then the env should support multi-line values and maybe even base64
I usually don't like to be forced to mount files into containers, hence the env approach.
@geek-at commented on GitHub (May 14, 2025):
If you use a reverse proxy behind the docker container you can set them there as the highest point in the chain (closer to the internet) can overwrite the headers. Currently they are hardcoded in the nginx config file of the container.
@sgohl commented on GitHub (May 15, 2025):
@geek-at I'm aware of that, but this adds unnecessary complexity/requirement to the reverse proxy in front, which is in that regard not it's actual job. Setting this header is responsibility of the application itself, at least for my understanding.
There are people who don't use plain old handrafted nginx configs for only a handful of things. This gets easily unmanagable for hundreds of web apps.
edit: did you check my fork proposal? https://github.com/sgohl/pictshare/pull/1/files