Replies: 2 comments
-
Try setting cookie_domain? |
Beta Was this translation helpful? Give feedback.
0 replies
-
I just tried this and aame issue. It didnt work.
…On Sun, 24 Sept 2023, 1:36 pm Robert Newson, ***@***.***> wrote:
Try setting cookie_domain
<https://docs.couchdb.org/en/stable/config/auth.html#chttpd_auth/cookie_domain>
?
—
Reply to this email directly, view it on GitHub
<#4773 (comment)>,
or unsubscribe
<https://github.com/notifications/unsubscribe-auth/ALEYOQOV65AYV66KFLKLUODX4AEMFANCNFSM6AAAAAA5ERFEVY>
.
You are receiving this because you authored the thread.Message ID:
***@***.***>
|
Beta Was this translation helpful? Give feedback.
0 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
I am trying to connect a webapp to my couchdb server that is hosted on a secure domain https://mydomain.com.
My cors config:
[cors]
credentials = true
origins = *
headers = X-Couch-Id, X-Couch-Rev
methods = GET,POST,PUT,DELETE,OPTIONS
max_age = 3600
[couch_httpd_auth]
same_site = lax
allow_persistent_cookies = true
when i put same_site=none , i cant login to https://mydomain.com/_utils but changing it to lax fixed that.
But still the app is unable to login to couchdb when using chrome, i tried serveral chrome on different pc and got same error. And with Firefox everything works normally.
In nginx i have these config:
server {
listen 80 default_server;
server_name mydomain.com;
location / {
proxy_pass http://localhost:5984;
proxy_redirect off;
proxy_set_header Host $host;
proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
proxy_set_header X-Forwarded-Proto $scheme;
if ($request_method = 'OPTIONS') {
add_header 'Access-Control-Allow-Origin' 'https://web.myapp.app'; # Set to your application's origin
add_header 'Access-Control-Allow-Methods' 'GET, POST, PUT, DELETE, OPTIONS';
add_header 'Access-Control-Allow-Headers' 'Origin, X-Requested-With, Content-Type, Accept, Authorization';
add_header 'Access-Control-Allow-Credentials' 'true'; # Allow credentials
add_header 'Access-Control-Max-Age' 1728000;
add_header 'Content-Type' 'text/plain charset=UTF-8';
add_header 'Content-Length' 0;
return 204;
}
}
}
can any one help please.
Beta Was this translation helpful? Give feedback.
All reactions