Skip to content

Commit dd4ca46

Browse files
committed
fixed insecure cookie issue causing login persist issues
1 parent 013cd26 commit dd4ca46

File tree

3 files changed

+8
-4
lines changed

3 files changed

+8
-4
lines changed

Dockerfile

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -27,6 +27,9 @@ COPY custom-php.ini /usr/local/etc/php/conf.d/uploads.ini
2727
# Enable Apache mod_rewrite
2828
RUN a2enmod rewrite
2929

30+
# Enable Apache mod_headers
31+
RUN a2enmod headers
32+
3033
# Set working directory
3134
WORKDIR /var/www/html
3235

README.md

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -101,10 +101,6 @@ Using Docker for Hubzilla provides several advantages:
101101
- SMTP environment variables are necessary for admin registration. Make sure they are specified in the `.env` files correctly. Use app passwords if necessary for services with TFA(gmail, etc.).
102102
- Upload size limit is controlled by custom-php.ini, currently set to 20MB. Change if needed to appropriate value.
103103

104-
## Known issues
105-
106-
- If login doesn't persist, add the following to your proxy config `proxy_cookie_path / "/; Secure; HttpOnly; SameSite=None";`
107-
108104
## TODO
109105

110106
- [ ] Optimize image size.

apache-config.conf

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,11 @@
66
Require all granted
77
</Directory>
88

9+
# Add SameSite=None, Secure, and HttpOnly to all Set-Cookie headers
10+
<IfModule mod_headers.c>
11+
Header edit Set-Cookie ^(.*)$ $1;Secure;HttpOnly;SameSite=None
12+
</IfModule>
13+
914
ErrorLog ${APACHE_LOG_DIR}/error.log
1015
CustomLog ${APACHE_LOG_DIR}/access.log combined
1116
</VirtualHost>

0 commit comments

Comments
 (0)