X-Frame-Options: DENY
Posted: Tuesday 16 June 2020 4:10
I am trying to get Dashticz to show the train times for my local metro station. Tfl (Transport for London) have an api for that but I am getting the following error
api.tfl.gov.uk is blocked
api.tfl.gov.uk refused to connect.
ERR_BLOCKED_BY_RESPONSE
Chrome console shows the following error
Refused to display 'https://api.tfl.gov.uk/StopPoint/940GZZ ... pp_id=xxxx' in a frame because it set 'X-Frame-Options' to 'deny'.
I know this is an x-frame origin restriction but the cors proxy should’ve taken care of that. I checked if my Raspberry is running php and it wasn’t so I installed it
pi@raspberrypi:~ $ php -v
PHP 7.3.14-1~deb10u1 (cli) (built: Feb 16 2020 15:07:23) ( NTS )
Copyright (c) 1997-2018 The PHP Group
This is the link in my config.js file. Note the xxxx are where my api key and app key go. The link works fine in the browser with and without the api keys. Without the keys, you are limited to a few queries I believe. If you want to test the link and see the response follow this link;
https://api.tfl.gov.uk/StopPoint/940GZZ ... ?mode=tube
var frames = {}
frames.tube = {
frameurl:"https://api.tfl.gov.uk/StopPoint/940GZZ ... d=xxxxxxxx",
height: 350}
I’ve spent two days trying to figure this out and I just can’t. I’d appreciate any help on this.
Thank you
api.tfl.gov.uk is blocked
api.tfl.gov.uk refused to connect.
ERR_BLOCKED_BY_RESPONSE
Chrome console shows the following error
Refused to display 'https://api.tfl.gov.uk/StopPoint/940GZZ ... pp_id=xxxx' in a frame because it set 'X-Frame-Options' to 'deny'.
I know this is an x-frame origin restriction but the cors proxy should’ve taken care of that. I checked if my Raspberry is running php and it wasn’t so I installed it
pi@raspberrypi:~ $ php -v
PHP 7.3.14-1~deb10u1 (cli) (built: Feb 16 2020 15:07:23) ( NTS )
Copyright (c) 1997-2018 The PHP Group
This is the link in my config.js file. Note the xxxx are where my api key and app key go. The link works fine in the browser with and without the api keys. Without the keys, you are limited to a few queries I believe. If you want to test the link and see the response follow this link;
https://api.tfl.gov.uk/StopPoint/940GZZ ... ?mode=tube
var frames = {}
frames.tube = {
frameurl:"https://api.tfl.gov.uk/StopPoint/940GZZ ... d=xxxxxxxx",
height: 350}
I’ve spent two days trying to figure this out and I just can’t. I’d appreciate any help on this.
Thank you