Giter Site home page Giter Site logo

Comments (5)

gritstub avatar gritstub commented on July 28, 2024 1

I've made my changes locally with ./downloading and ./upload, which works fine.
It's unnecessary to add the domain and path, since they reside in the same relative path.

I'm hope that you can take this into account for your next version, so that I can just use your docker without modifications.

from speed-test.

openspeedtest avatar openspeedtest commented on July 28, 2024

Services behind reverse proxy server will not or not need to know your domain name or url structure.
It doesn't matter where you put the application.
You are using docker?
I am missing something. ,🤔

Please post more details..
Steps to reproduce this issue and expected change / fix
Thanks

from speed-test.

gritstub avatar gritstub commented on July 28, 2024

I am running in a Docker, and am using swag (nginx) to create a reverse proxy via subfolder.

eg: http://mydomain.com/myopenspeedtest/

My swag nginx looks like

location /myopenspeedtest/ {
  rewrite ^/myopenspeedtest(.*)$ $1 break;
  proxy_pass http://openspeedtest:3000;
}

Now the main page can open, however, the openspeedtest doesn't like being in a folder.

The links to "upload" and "downloader" are absolute paths to the root. Please change them to be relative.

{ "hostName": "/upload" }

and

m[a].open("GET",comopenspeedtestcdn+"/downloading?n=

So the application tries to load http://mydomain.com/downloader?n=... instead of http://mydomain.com/myopenspeedtest/downloader?n=...

You can just change it to "./" instead of "/"

from speed-test.

openspeedtest avatar openspeedtest commented on July 28, 2024

open index.html in a text editor and modify the following
under script tag.

// This is for ping add more URL for more ping samples and more precise result
var comopenspeedtesturl = {
"serverList": [
{ "hostName": "//yourdomain.com/subfolder/downloading" },
{ "hostName": "//yourdomain.com/subfolder/downloading" },
{ "hostName": "//yourdomain.com/subfolder/downloading" },
{ "hostName": "//yourdomain.com/subfolder/downloading" },
{ "hostName": "//yourdomain.com/subfolder/downloading" }
]
};
//
// this is for upload
var comopenspeedtestuurl = {
"serverList": [
{ "hostName": "//yourdomain.com/subfolder/upload" }

  ]
};

// download file url
var comopenspeedtestcdn = "//yourdomain.com/subfolder/downloading";

I am developing a new version so this setup will change in future. But it will be much easier to add custom path or list of hostnames.

Now mount modified index.html to your docker container.

path will be /usr/share/nginx/html/index.html

add -v in docker command / compose file

-v /PATH-TO-YOUR-HTML-MOD/:/usr/share/nginx/html/

from speed-test.

openspeedtest avatar openspeedtest commented on July 28, 2024

Done #32

from speed-test.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.