File tree 4 files changed +26
-9
lines changed
4 files changed +26
-9
lines changed Original file line number Diff line number Diff line change 1
1
## csss-site-frontend nginx configuration file
2
2
3
+ upstream backend {
4
+ server unix:/var/www/gunicorn.sock fail_timeout=0;
5
+ }
6
+
3
7
server {
4
8
server_name new.sfucsss.org;
5
9
listen 443 ssl;
@@ -12,20 +16,34 @@ server {
12
16
include /etc/letsencrypt/options-ssl-nginx.conf;
13
17
ssl_dhparam /etc/letsencrypt/ssl-dhparams.pem;
14
18
19
+ # proxy csss-site-backend
20
+ location /api/ {
21
+ # rewrite location to exclude leading /api
22
+ rewrite ^/api/(.*)$ /$1 break;
23
+
24
+ # proxy request through the backend
25
+ proxy_pass http://backend;
26
+ proxy_set_header Host $host ;
27
+ proxy_set_header X-Real-IP $remote_addr ;
28
+ proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for ;
29
+ proxy_set_header X-Forwarded-Proto $scheme ;
30
+ }
31
+
15
32
# redirects old 2024 mountain madness requests to the new URL
16
33
location ~ ^/events/2024/mm(/|/index.html)?$ {
17
34
return 301 /mountain_madness/2024/index.html;
18
35
}
19
-
20
- location = / {
36
+
37
+ # any other matching path
38
+ location / {
21
39
try_files $uri $uri / $uri /index.html =404 ;
22
40
}
23
41
}
24
42
25
43
server {
26
44
server_name new.sfucsss.org;
27
45
listen 80 ;
28
-
46
+
29
47
if ($host = new.sfucsss.org) {
30
48
return 301 https://$host$request_uri ;
31
49
}
Original file line number Diff line number Diff line change 1
- const CSSS_API = 'https://api .sfucsss.org' ;
1
+ const CSSS_API = 'https://new .sfucsss.org/api ' ;
2
2
3
3
/**
4
4
* Checks if a media query matches.
@@ -89,9 +89,8 @@ export function casLogin(next) {
89
89
/** get information about the currently logged in user */
90
90
export async function casGetUser ( ) {
91
91
try {
92
- const response = await fetch ( `${ CSSS_API } /auth/check` , {
93
- method : 'GET' ,
94
- credentials : 'include' // cookies
92
+ const response = await fetch ( '/api/auth/check' , {
93
+ method : 'GET'
95
94
} ) ;
96
95
97
96
if ( ! response . ok ) {
Original file line number Diff line number Diff line change @@ -74,7 +74,7 @@ export const Page = (props) => {
74
74
< div
75
75
className = "bg-zinc-950 border-t border-zinc-800 flex flex-row"
76
76
style = { {
77
- 'grid-area' : 'bottom-bar'
77
+ gridArea : 'bottom-bar'
78
78
} }
79
79
>
80
80
< p
Original file line number Diff line number Diff line change @@ -103,7 +103,7 @@ export const Home = () => {
103
103
src = "/static/files/main/president.jpg"
104
104
alt = "President Portrait"
105
105
className = "w-64 h-80 object-cover rounded-lg float-left mr-6 mb-4"
106
- style = { { 'overflow-clip-margin' : 'unset' } }
106
+ style = { { overflowClipMargin : 'unset' } }
107
107
/>
108
108
< p
109
109
className = "text-lg sm:text-xl md:text-2xl leading-relaxed text-left"
You can’t perform that action at this time.
0 commit comments