Skip to content

Commit 44f41c5

Browse files
authored
Merge pull request #255 from ShaneIsrael/develop
Develop
2 parents e3ff3b2 + a176815 commit 44f41c5

File tree

5 files changed

+12
-14
lines changed

5 files changed

+12
-14
lines changed

README.md

+3-6
Original file line numberDiff line numberDiff line change
@@ -14,18 +14,15 @@
1414
<a href="https://github.com/shaneisrael/fireshare/actions">
1515
<img alt="Docker Build" src="https://github.com/shaneisrael/fireshare/actions/workflows/docker-publish-main.yml/badge.svg" />
1616
</a>
17+
<a href="https://hub.docker.com/r/shaneisrael/fireshare">
18+
<img alt="Docker Pulls" src="https://img.shields.io/docker/pulls/shaneisrael/fireshare?label=docker%20pulls">
19+
</a>
1720
<a href="https://hub.docker.com/r/shaneisrael/fireshare/tags?page=1&ordering=last_updated">
1821
<img alt="GitHub tag (latest SemVer)" src="https://img.shields.io/github/v/tag/shaneisrael/fireshare?label=version">
1922
</a>
2023
<a href="https://github.com/shaneisrael/fireshare/stargazers">
2124
<img alt="GitHub stars" src="https://img.shields.io/github/stars/shaneisrael/fireshare">
2225
</a>
23-
<a href="https://github.com/shaneisrael/fireshare/issues">
24-
<img alt="Issues" src="https://img.shields.io/github/issues/shaneisrael/fireshare?color=0088ff" />
25-
</a>
26-
<a href="https://github.com/shaneisrael/fireshare/pulls">
27-
<img alt="GitHub pull requests" src="https://img.shields.io/github/issues-pr/shaneisrael/fireshare?color=0088ff" />
28-
</a>
2926
<br />
3027
<br />
3128
<a href="https://v.fireshare.net">Live Demo</a>

app/client/package.json

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "fireshare",
3-
"version": "1.2.19",
3+
"version": "1.2.20",
44
"private": true,
55
"dependencies": {
66
"@emotion/react": "^11.9.0",

app/client/src/common/utils.js

+6-5
Original file line numberDiff line numberDiff line change
@@ -1,15 +1,16 @@
11
import React from 'react'
22

3+
let isLocalhost = (window.location.hostname.indexOf('localhost') >= 0 || window.location.hostname.indexOf('127.0.0.1') >= 0) && window.location.port !== '';
34
export const getServedBy = () => {
4-
return (window.location.hostname.indexOf('localhost') >= 0 && window.location.port !== '')
5+
return isLocalhost
56
? 'flask'
67
: 'nginx'
78
}
89

910
export const getUrl = () => {
1011
const portWithColon = window.location.port ? `:${window.location.port}` : ''
11-
return (window.location.hostname.indexOf('localhost') >= 0 && window.location.port !== '')
12-
? `http://localhost:${process.env.REACT_APP_SERVER_PORT || window.location.port}`
12+
return isLocalhost
13+
? `http://${window.location.hostname}:${process.env.REACT_APP_SERVER_PORT || window.location.port}`
1314
: `${window.location.protocol}//${window.location.hostname}${portWithColon}`
1415
}
1516

@@ -19,8 +20,8 @@ export const getPublicWatchUrl = () => {
1920
return `${shareableLinkDomain}/w/`
2021
}
2122
const portWithColon = window.location.port ? `:${window.location.port}` : ''
22-
return (window.location.hostname.indexOf('localhost') >= 0 && window.location.port !== '')
23-
? `http://localhost:${process.env.REACT_APP_SERVER_PORT || window.location.port}/#/w/`
23+
return isLocalhost
24+
? `http://${window.location.hostname}:${process.env.REACT_APP_SERVER_PORT || window.location.port}/#/w/`
2425
: `${window.location.protocol}//${window.location.hostname}${portWithColon}/w/`
2526
}
2627

app/nginx/prod.conf

+1-1
Original file line numberDiff line numberDiff line change
@@ -23,7 +23,7 @@ http {
2323

2424
access_log /var/log/nginx/access.log main;
2525

26-
sendfile on;
26+
sendfile off;
2727
sendfile_max_chunk 512k;
2828
tcp_nopush on;
2929

app/server/requirements.txt

+1-1
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@ Flask-Migrate==3.1.0
77
Flask-SQLAlchemy==2.5.1
88
Flask-WTF==1.0.1
99
future==0.18.2
10-
greenlet==1.1.2
10+
greenlet==3.0.3
1111
gunicorn==20.1.0
1212
importlib-metadata==4.11.3
1313
itsdangerous==2.1.2

0 commit comments

Comments
 (0)