OpenSprinkler Forums OpenSprinkler Mobile and Web App iOS app version 2.2.2 possibly losing saved sites on update Reply To: iOS app version 2.2.2 possibly losing saved sites on update

#70047

bensweet
Participant

Confirming the app has been working well. Looks like the basic auth was actually an issue with CORS. Somewhere in all of this (I haven’t looked too far in the iOS updates) it looks as though something has changed with the CORS preflight request and the Apache reverse proxy started to fail CORS on a number of fronts.

For what its worth I always had Header set Access-Control-Allow-Origin “*” which for year had worked ok but the preflight was killing this. Had to make several changes to get this to work, as below

# Enable CORS
Header unset Access-Control-Allow-Origin
Header always set Access-Control-Allow-Origin “*”
Header always set Access-Control-Allow-Methods “POST, GET, OPTIONS, DELETE, PUT”
Header always set Access-Control-Allow-Headers “append,delete,entries,foreach,get,has,keys,set,values,Authorization”

# Rewrite OPTIONS message to return Http ok message
RewriteEngine On
RewriteCond %{REQUEST_METHOD} OPTIONS
RewriteRule ^(.*)$ $1 [R=200,L]