WebFaction
Community site: login faq

Hello, Raised a ticket on this but thought the community could help.

Django 2.2.1 Python 3.7. GeoDjango with Admin using admin.site.register(Waypoint, admin.OSMGeoAdmin) Adding Waypoints to an Open Street Map.

Works fine in Firefox but has CORS problems in Chrome and Edge.

Chrome Console Error

Access to image at 'http://c.tile.openstreetmap.org/4/9/9.png' from origin 'http://my.website.com' has been blocked by CORS policy: The response is invalid.

Browser Edge Console

SEC7120: [CORS] The origin 'http://my.website.com' did not find 'http://my.website.com' in the Access-Control-Allow-Origin response header for cross-origin image resource at 'http://b.tile.openstreetmap.org/4/11/4.png'.

Updated the httpd.conf with Header set Access-Control-Allow-Origin "*" (snippet) And at help staffs suggestion did much the same by setting my Static app to a satic/php and adding much the same in .htaccess. No fix.

Added django-cors-headers and updated settings.py as appropriate ../mydjango/lib/python3.7/$ easy_install-3.7 django-cors-headers But no change.

Works in Firefox so I can't be too far off.

Anyone any ideas?

Stuart

asked 17 May, 14:22

Parthian
16410
accept rate: 0%


Not a CORS problem. Avast Online Security - an extension to help block Phishing etc was to blame. Suspect something in Webfaction/GeoDjango setup is incompatible with the Avast plugin. Could be fairly commonly used though. Turned it off for now.

permanent link

answered 18 May, 15:14

Parthian
16410
accept rate: 0%

Your answer
toggle preview

Follow this question

By Email:

Once you sign in you will be able to subscribe for any updates here

By RSS:

Answers

Answers and Comments

Markdown Basics

  • *italic* or _italic_
  • **bold** or __bold__
  • link:[text](http://url.com/ "title")
  • image?![alt text](/path/img.jpg "title")
  • numbered list: 1. Foo 2. Bar
  • to add a line break simply add two spaces to where you would like the new line to be.
  • basic HTML tags are also supported

Question tags:

×40
×8
×4
×1

question asked: 17 May, 14:22

question was seen: 168 times

last updated: 18 May, 15:14

WEBFACTION
REACH US
SUPPORT
AFFILIATE PROGRAM
LEGAL
© COPYRIGHT 2003-2019 SWARMA LIMITED - WEBFACTION IS A SERVICE OF SWARMA LIMITED
REGISTERED IN ENGLAND AND WALES 5729350 - VAT REGISTRATION NUMBER 877397162
5TH FLOOR, THE OLD VINYL FACTORY, HAYES, UB3 1HA, UNITED KINGDOM