http-status-code-403

Instagram/feed API media URL shows 'URL signature expired'

試著忘記壹切 提交于 2019-12-04 09:58:55
问题 I am using Instagram feed API to show my Instagram posts on my Website. But some video URL shows ' URL signature expired '. Any solution for me ? 回答1: Instagram has added URL signatures to their media URLs. You can easily remove the URL signature using this regular expression: "vp.*/.{32}/.{8}/" For example in PHP: preg_replace('/vp.*\/.{32}\/.{8}\//', '', $mediaUrl) On the other hand, I don't think that removing the URL signature is the best solution (is just a quick fix). The good one is to

Google Weather API returns HTTP 403 Error

戏子无情 提交于 2019-12-04 06:46:39
问题 I use the Google weather API in my web site, and today I get an error that the API link doesn't return any data. When I check the link directly I get an (Error 403). Here is the link. Can anyone please tell me a solution for this and provide me another link for the API? 回答1: Every now and then the API stops working for short periods of time, the last days more often a 403 is trown. For my site, last night it happened 13 times. But the site tries immediately again and the second or third time,

403 forbidden error on S3 REST API HEAD request

倖福魔咒の 提交于 2019-12-04 04:57:52
Im trying do do a HEAD Object request to the S3 REST API but I keep getting a 403 Forbidden error, even though I have the policy setup with the necessary permissions on S3. The response body is empty, so I don't think its a signature problem. I've tried several changes to the policy, nothing seems to make it work. I'm able to PUT objects and DELETE objects normally, just HEAD doesn't work. Here's my bucket policy: { "Statement": [ { "Effect": "Allow", "Principal": { "AWS": "arn:aws:iam:: 999999999999:user/User" }, "Action": "s3:ListBucket", "Resource": "arn:aws:s3:::my-bucket" }, { "Effect":

ImageIO.read() returns 403 error

 ̄綄美尐妖づ 提交于 2019-12-04 03:42:44
问题 I have the following code: public BufferedImage urlToImage(String imageUrl) throws MalformedURLException, IOException { URL url = new URL(imageUrl); BufferedImage image = ImageIO.read(url); return image; } That is supposed to return an image from a given URL. I tested with these two randomly chosen URLs: https://www.google.co.ma/images/srpr/logo4w.png http://www.earthtimes.org/newsimage/osteoderms-storing-minerals-helped-huge-dinosaurs-survive_3011.jpg The first one works fine, but the second

Google API returning Access Not Configured

爷,独闯天下 提交于 2019-12-03 23:39:30
问题 I thought this would be straight forward, but for some reason I'm getting hammered on this one. I'm using PHP + CURL to try and retrieve a list of Web Fonts. The code is simple: $url = "https://www.googleapis.com/webfonts/v1/webfonts?sort=popularity&key=MY_SERVER_APPS_KEY"; $ch = curl_init(); curl_setopt($ch, CURLOPT_SSL_VERIFYPEER, FALSE); curl_setopt($ch, CURLOPT_HEADER, false); curl_setopt($ch, CURLOPT_FOLLOWLOCATION, true); curl_setopt($ch, CURLOPT_URL, $url); curl_setopt($ch, CURLOPT

django ajax post 403 forbidden

被刻印的时光 ゝ 提交于 2019-12-03 16:47:56
问题 using django 1.4 im getting a 403 error when i try to do a post from my javascript do my django server. my get works fine though the problem is only with the post. also tried @csrf_exempt with no luck UPDATE: I can Post now that i added {% csrf_token %} , but the post response comes empty, although the GET comes correctly, any ideas? my django view: @csrf_protect def edit_city(request,username): conditions = dict() #if request.is_ajax(): if request.method == 'GET': conditions = request.method

git instaweb gives 403 Forbidden - No projects found

坚强是说给别人听的谎言 提交于 2019-12-03 15:18:36
running git instaweb in my repository opens a page that says "403 Forbidden - No projects found". What am I missing? looks like the debian install of git sets $projectroot globally in a way that confuses instaweb . I removed the $projectroot line from /etc/gitweb.conf and the error went away. I don't know Git about Git, but you're probably missing the ability to execute on the directory in question, chmod +X it. check the git-web cgi (the perl), see the directory of the projectroot is same as your currect setting. there are some settings that not in gitweb.conf Two years later .. I fixed this

How to deny with 404 on nginx

你。 提交于 2019-12-03 13:31:01
I want to secure some locations in nginx by supplying deny/allow directives, but I do not want outsider to know that a location is denied. I want outsider to get 404, not 403 http code. My configuration snippet is location /admin/ { uwsgi_pass myupstream1; include /path/to/uwsgi_params; allow 127.0.0.1; deny all; } When I try to visit /admin/ nginx responds with HTTP 403, but I want it respond with HTTP 404. Any recipe for this? ARGB32 error_page 403 404 /404.html; location = /404.html { internal; #return 404 } location /admin/ { uwsgi_pass myupstream1; include /path/to/uwsgi_params; allow 127

404 vs 403 when directory index is missing

删除回忆录丶 提交于 2019-12-03 13:11:59
This is mostly a philosophical question about the best way to interpret the HTTP spec. Should a directory with no directory index (e.g. index.html) return 404 or 403? (403 is the default in Apache.) For example, suppose the following URLs exist and are accessible: http://example.com/files/file_1/ http://example.com/files/file_2/ But there's nothing at: http://example.com/files/ (Assume we're using 301s to force trailing slashes for all URLs.) I think several things should be taken into account: By default, Apache returns 403 in this scenario. That's significant to me. They've thought about

Wampserver 403 on named virtual hosts outside of /www

风格不统一 提交于 2019-12-03 12:13:37
问题 Wampserver tells me accessed denied when I try making a virtual host outside of the c:/wamp/www/ directory. I can make one fine within that directory. Even making a symbolic link to the folder works, but I would rather not have to use symbolic links. Why doesn't it work? Here is the code I use at the end of httpd.conf NameVirtualHost *:80 <VirtualHost *:80> DocumentRoot "c:/wamp/www" ServerName localhost ServerAlias localhost </VirtualHost> <VirtualHost *:80> ServerName local.cascade