titaniumnetwork-dev / Ultraviolet-App

Example application of Ultraviolet which can be deployed in production.
https://docs.titaniumnetwork.org/proxies/ultraviolet
MIT License
253 stars 4.02k forks source link

SyntaxError: Unexpected token - when using docker and reverse proxy #43

Closed CodingCody-1 closed 1 year ago

CodingCody-1 commented 1 year ago

Expected Behavior

Site should load

Current Behavior

I get this error:

SyntaxError: Unexpected token '<', "<html>
<h"... is not valid JSON

Steps to Reproduce

  1. Clone the repo
  2. Add version: "3" to the top of the docker-compose
  3. Spin up container
  4. Use nginx reverse proxy on another server to add SSL and a domain
  5. Go to any link

Context (Environment)

Running on Docker on Ubuntu 20.04. Using nginx-reverse-proxy and Cloudflare for DNS.

calcossmonkey commented 1 year ago

yea i think this is happening to everyone right now i think this is a problem on ultraviolets side. SyntaxError: Unexpected token < in JSON at position 0 even on my home computer im getting this error, I think that something internal is causing this error..

CodingCody-1 commented 1 year ago

Are you running a setup similar to mine? I think the issue is that I am not connecting to it over localhost. Instead I am using the IP address of the server.

CodingCody-1 commented 1 year ago

I fixed my issue! I needed to disable basic password auth in Nginx. See here.