Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Javascript: grab config options dynamically from the server #3

Closed
k3d3 opened this issue Jun 12, 2015 · 1 comment
Closed

Javascript: grab config options dynamically from the server #3

k3d3 opened this issue Jun 12, 2015 · 1 comment
Labels

Comments

@k3d3
Copy link
Contributor

k3d3 commented Jun 12, 2015

Currently everything in the Javascript (such as the static_key, for example) is hard-coded, and will likely trip up anyone new to the project. Instead, the server should expose a new /config endpoint that returns a JSON object, consumable by the browser Javascript.

To start, it should contain the static key. Additionally, there should be an option to disable uploading from the browser side (i.e. by not sending a static key at all, configurable from the server). This means it can only be uploaded to by external clients, e.g. ShareX or upclient, if they know the static key.

@k3d3 k3d3 added the bug label Jun 12, 2015
@k3d3 k3d3 changed the title Browser: grab config options dynamically from the server Javascript: grab config options dynamically from the server Jun 12, 2015
@andre-d
Copy link
Contributor

andre-d commented Jun 13, 2015

There are a number of disadvantages to this and advantages. I will discuss
it verbally with you some time to decide what works best.
On Jun 12, 2015 12:24 AM, "Keith Morrow" notifications@github.com wrote:

Currently everything in the Javascript (such as the static_key, for
example) is hard-coded, and will likely trip up anyone new to the project.
Instead, the server should expose a new /config endpoint that returns a
JSON object, consumable by the browser Javascript.

To start, it should contain the static key. Additionally, there should be
an option to disable uploading from the browser side (i.e. by not sending a
static key at all, configurable from the server). This means it can only be
uploaded to by external clients, e.g. ShareX or upclient, if they know the
static key.


Reply to this email directly or view it on GitHub
#3.

@k3d3 k3d3 closed this as completed Jun 23, 2015
ultramancool pushed a commit that referenced this issue Aug 27, 2015
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

2 participants