mirror of
https://github.com/NginxProxyManager/nginx-proxy-manager.git
synced 2026-04-26 09:55:51 +03:00
[GH-ISSUE #379] Custom CORS #319
Labels
No labels
awaiting feedback
bug
cannot reproduce
dns provider request
duplicate
enhancement
enhancement
enhancement
good first issue
help wanted
invalid
need more info
no certbot plugin available
product-support
pull-request
question
stale
troll
upstream issue
v2
v2
v2
v3
wontfix
No milestone
No project
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set.
Reference
starred/nginx-proxy-manager-NginxProxyManager#319
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 @JonathanTreffler on GitHub (Apr 18, 2020).
Original GitHub issue: https://github.com/NginxProxyManager/nginx-proxy-manager/issues/379
Is your feature request related to a problem? Please describe.
We all know CORS is a huge pain to set up. At least if you want to do it right and don't already have a working snippet to paste in.
I love this Proxy Manager, because it makes many things much more easy, but it makes CORS even worse.
I have been able to create a proxy host, that can handle preflight cors requests with a custom location (like in #202), but i still think there should be a way to set CORS with the GUI.
A GUI Option was mentioned in #202, but since that wasn't the original topic of the issue i created this issue dedicated to a gui solution.
Describe the solution you'd like

A GUI for CORS in the Advanced Tab, to control CORS like this:
@fturiot commented on GitHub (Feb 9, 2021):
hi,
actualy how change Access-Control-Allow-Origin ?
thanks
@JonathanTreffler commented on GitHub (Feb 10, 2021):
Thats not easy in my opinion, but take a look here #202
@Na0mir commented on GitHub (Mar 25, 2021):
This would be awesome!
@trdwll commented on GitHub (Jan 6, 2022):
@jc21 Any news on this? I think it could be a great small addition to the next release if you have the time.
@NathanPeake commented on GitHub (Apr 4, 2022):
this is really needed
@rallisf1 commented on GitHub (Aug 7, 2022):
Just want to share my working config for CORS as I spent quite a few hours to figure it out. I use the following on the advanced tab of the proxy host settings:
Edit Nov/22: For some reason
add_headerstopped working a few weeks ago,more_set_headersdid the trick.@Tharic99 commented on GitHub (Aug 17, 2022):
@rallisf1 Can you clarify more what
location ~ ^/THE-PATH-TO-PROTECT {means?Example: If my hosted domain is www.yahoo.com and I want to ensure that 192.168.x.x is allowed via CORS, I know I would replace YOUR-REQUEST-DOMAIN with www.yahoo.com, but does the 192.168.x.x go anywhere?
@rallisf1 commented on GitHub (Aug 17, 2022):
@Tharic99 see the docs for location syntax.
THE-PATH-TO-PROTECTis used if you want to use CORS just for a subfolder, the hosted domain is inherited from the server block.YOUR-REQUEST-DOMAINcan be your IP address as long as that is used for the request. Check the error message in your browser console and use exactly the address that fails CORS. Also note that you can only allow 1 address (or IP) by default and cannot use wildcards. See here for a workaround.@luixal commented on GitHub (Oct 7, 2022):
Hi,
This comment from @rallisf1 just saved my day. Thanks man!
@github-actions[bot] commented on GitHub (Mar 30, 2024):
Issue is now considered stale. If you want to keep it open, please comment 👍
@dimo414 commented on GitHub (Mar 30, 2024):
Stalebot go away.
@github-actions[bot] commented on GitHub (Dec 21, 2024):
Issue is now considered stale. If you want to keep it open, please comment 👍
@NathanPeake commented on GitHub (Dec 21, 2024):
not stale
@github-actions[bot] commented on GitHub (Nov 12, 2025):
Issue is now considered stale. If you want to keep it open, please comment 👍